Inverse Square Weighted Interpolation 

Suppose we wish to interpolate a surface through a set of nonuniformly distributed control points z = z(x, y). Of course, there are infinitely many surfaces passing through any finite set of control points, so the result is not uniquely determined unless we specify some additional information, which serves as a criterion for "goodness of fit", constraining the overall shape of the surface. 

One common technique is multiple linear regression. This requires us to specify the "form" of the surface. For example, we could specify 



and then use linear regression to determine the coefficients A,B,..,G such that the sum of squares of the z errors at the control points is minimized. To ensure that this surface actually passes through each of the N control points, we would need to choose a "form" with N terms. For example, the above form will fit any seven control points exactly. 

Another interesting method, and one that automatically passes through each control point, is the "inverse square weighting" method. Given the values of f(x_{i},y_{i}) for N points (x_{1},y_{1}), (x_{2},y_{2}), ... (x_{N},y_{N}), the interpolated function for every other point (x,y) is 



where R_{i}^{2} = (x−x_{i})^{2} + (y−y_{i})^{2}. This can obviously be extended to any number of dimensions. For points (x,y) far from any of the control points, the value of f approaches the average of the f values for the control points. 

To illustrate, suppose we are given two control points f(0,0) = 1 and f(1,0) = −1. The surface generated by these two points is shown below. 



For another example, suppose we are given the four points 



The surface generated by these four points is shown below. 


