The nodal functions used in inverse distance weighted interpolation can be higher degree polynomial functions constrained to pass through the data points and approximate the nearby points in a least squares manner. Quadratic polynomials have been found to work well in many cases (Franke & Nielson 1980; Franke 1982). The resulting surface reproduces local variations implicit in the dataset, is smooth, and approximates the quadratic nodal functions near the data points. The equation used for the quadratic nodal function centered at point k is as follows:

${\displaystyle Q_{k}(x,y)=a_{k1}+a_{k2}\left(x-x_{k}\right)+a_{k3}(y-y_{k})+a_{k4}(x-x_{k})^{2}+a_{k5}(x-x_{k})(y-y_{k})+a_{k6}(y-y_{k})^{2}}$

To define the function, the six coefficients ak1..ak6 must be found. Since the function is centered at the point k and passes through point k, we know beforehand that ak1=fk where fk is the function value at point k. The equation simplifies to:

Now there are only five unknown coefficients. The coefficients are found by fitting the quadratic to the nearest NQ data points using a weighted least squares approach. In order for the matrix equation used to solve for the coefficients to be stable, there should be at least five data points in the set.

## 3D Interpolation

For 3D interpolation, the following equation is added to the quadratic nodal function:

To define the function, the ten coefficients ak1..ak10 must be found. Since the function is centered on point k, we know that ak1=fk where fk is the data value at point k. The equation simplifies to:

Now there are only nine unknown coefficients. The coefficients are found by fitting the quadratic to a subset of the neighboring data points in a weighted least squares fashion. In order for the matrix equation used to be solve for the coefficients to be stable, there should be at least ten non-coplanar data points in the set.