Hi all.

Let say I have three base points (P1, P2, P3) on surface. Every base point defined by X1, X2, X3 and

Y1, Y2, Y3 coordinates. Every base point has one associated value Vn (V1, V2, V3). I have to calculate

approximated value V4 for point P4 defined by coordinates X4 and Y4. It's just a simplification of the

task.

In deed, I need a fast algorithm that allow me to calculate value for any point on the surface where

number of base points may be different, let say N.

type

TSFPoint = record

X: Integer;

Y: Integer;

V: Integer;

end;

TSFPoints = array of TSFPoint;

implementation

function GetValueFor(X,Y: Integer; Points: TSFPoints): Integer;

begin

?????

end;

-----

Igor.

a*x1+b*y1+c*z1+1=0

a*x2+b*y2+c*z2+1=0

a*x3+b*y2+c*z3+1=0

Solve this system, find a,b,c

Then find z4 for every x4 and y4

When number of base points >3 you can make triangulation for simple and fast 'plain' interpolation or calculate bicubic splines for 'smooth' interpolation