Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Linear Interpolation

  1. Nov 7, 2006 #1
    I have a problem where I need to work out a value of a specific point that lies in the quadrilateral that is formed by four seperate points.

    For each point that makes up the quadrilateral, I know the X and Y coordinates and their value, Z. For the point I am trying to find the value for, I only know the X and Y coordinates.

    I want to use linear interpolation to determine the value at that point, yet am not sure of the best mathematical technique to do it. For simplicity, I can assume that the quadrilateral is, for lack of a better term, 'squareish' - no inner angle is more than 180 degrees. The four points are also given in clockwise order.

    I have thought about using some simple line equations to do this, where I take the point and find the equation of the line that passes through one of the quadrilateral points. I then find the equations of the lines that form the quadrilateral and find the point where the original line intersects with one of the quadrilateral lines. I can interpolate the value at this point and then use that interpolated value to interpolate the value at the point I need.

    Would this technique work or is there a better one. The most important aspect is that if the point lies on a known value, it takes that value. For all other points, it needs to be interpolated.

    A drawing of the problem and how I propose to sovle it can be found at http://www.benthegeek.com/benstuff/interpolation.gif

    I appreciate your time.
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you help with the solution or looking for help too?
Draft saved Draft deleted