+ Reply to Thread
Results 1 to 5 of 5

3D interpolation to estimate z-value

  1. #1
    Registered User
    Join Date
    06-08-2020
    Location
    Odense
    MS-Off Ver
    Office 365
    Posts
    7

    Question 3D interpolation to estimate z-value

    Hi!

    I am trying to challenge myself to learn new features of Excel, but have into some difficulties. Would appreciate any help on this matter.

    Imagine a city with 100's of buildings. I know the x and y-coordinate along witht the height (z-value) of a set of lets say 10 skyscrapers. They are not placed in a grid, and the x/y-values therefore seem random. I would like to be able to plot a random x/y-coordinate and get the corresponding height (z-value), to estimate the best "fitting" height of a new building based on the nearest skyscrapers.

    I am basically trying to find the z-value of a any given x/y-coordinate, based on the nearest known points - see the illustration below. I know the coordinates (x,y and z) to every black dots in the figure. Based on these values, i want to estimate the corresponding z-value of a given x/y-coordinate. Ideally, i would like to be able to plot the green surfaces in a 3D plot/graph along with the red point (with the correct z-value). From what i have been able to find so far, it seems quite difficult in excel - do any of you have any great ideas?

    xyz plot.png

    I have attached an example file.

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,829

    Re: 3D interpolation to estimate z-value

    Bilinear interpolation can be a challenging programming problem to implement. Most of the time, we have a more "regular" grid of values, in your case, they are less regular. In general, the overall algorithm involves:

    1) Finding the four points that define the quadrilateral containing the solution.
    2) Entering those four points into the interpolation formula: https://en.wikipedia.org/wiki/Biline..._interpolation

    As with most interpolation problems in a spreadsheet, the hardest part is the "lookup step" to find the four boundary points. With an irregular grid like you have, this can be even more complicated. How would you go about choosing the four boundary points for a given x,y,z point? For the example point, would you pick buildings, 1,2,5, and 7, or would you pick different points?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: 3D interpolation to estimate z-value

    don't think too complex.
    461.3 m with the 3 nearest buildings, 516.5 looking at all the buildings
    Attached Images Attached Images
    Last edited by bsalv; 01-05-2022 at 06:56 PM.
    Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

  4. #4
    Registered User
    Join Date
    06-08-2020
    Location
    Odense
    MS-Off Ver
    Office 365
    Posts
    7

    Re: 3D interpolation to estimate z-value

    Thanks both of you.

    You seem to have different approaches, using either 3 or 4 nearest points to determine the height.

    As MrShorty explains, the most difficult part is probably determining which points to use. I was initially going to calculate the length in x/y-plane from the given point to all the known points, and use the 3 buildings with the shortest distance - thereby getting the nearest points. However, this does not require the given point to actually be placed on the surface generated within the nearest points.

    Do you have any idea on how to determine which points to actually do the interpolation between? Idieally, i would like a mesh/surface generated by triangles as seen in the image of my original post, but i am not quite sure if its even possible.

  5. #5
    Forum Expert
    Join Date
    01-25-2011
    Location
    Belgium, Alveringem
    MS-Off Ver
    Excel 2003, 2007, 365
    Posts
    1,418

    Re: 3D interpolation to estimate z-value

    You seem to have different approaches, using either 3 or 4 nearest points to determine the height.
    no, 3 points is an exact match, >3 points it's estimate of the least squares-method.
    Attached Images Attached Images

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 04-14-2020, 02:07 PM
  2. Estimate values
    By m_k in forum Excel General
    Replies: 3
    Last Post: 12-20-2012, 12:05 AM
  3. Point Estimate
    By smallexcel in forum Excel General
    Replies: 1
    Last Post: 08-12-2012, 03:48 PM
  4. Finding point estimate and interval estimate
    By Codedzero in forum Excel General
    Replies: 1
    Last Post: 10-11-2009, 02:46 PM
  5. Replies: 0
    Last Post: 07-24-2008, 02:27 PM
  6. creating an estimate
    By aaronm in forum Excel General
    Replies: 1
    Last Post: 04-20-2008, 08:24 AM
  7. help with interpolation and limit of interpolation
    By uriel78 in forum Excel General
    Replies: 0
    Last Post: 02-18-2005, 10:06 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1