Functionally equivalent Fortran and C interfaces are provided in both single and double precision versions.
Natgrid is based on the work of Dr. Dave Watson and his nngridr package. Dr. Watson is well known in the field of interpolation. He has published many articles and two books in the area. See the references module for further information. Dr. Watson has our greatest gratitude for allowing us to incorporate segments of his code in our package. Information on how to obtain Dr. Watson's original nngridr code, as well as his accompanying book, can be obtained from URL http://www.iinet.com.au/~watson/nngridr.html.
The fitted function methods fit an algebraic surface to the known data and then pick the interpolated values from the fitted surface. The weighted average methods calculate interpolated values as weighted averages of known values.
Among the weighted average methods, the simplest are known as the inverse distance weighted average methods. These methods are implemented by calculating weights for all input coordinates such that the weights are inversely proportional to the distance an input coordinate is from the point where an interpolated value is desired. The sum of the weights is normalized to unity and an interpolated value is the sum of the products of the functional values and the calculated weights.
One distinguishing quality of natural neighbor interpolation is the way in which a set of neighboring points (the natural neighbors) is selected to use for interpolating at a given point. The natural neighbor selection process avoids the problems common to methods based on choosing a fixed number of neighboring points, or all points within a fixed distance.
Another distinguishing quality of natural neighbor interpolation is the way that the weights are calculated for the functional values at the natural neighbor coordinates. These weights are based on proportionate areas, rather than distances.
The method of finding the natural neighbors and calculating areas-based weights to produce interpolated values is called natural neighbor linear interpolation. This produces an interpolated surface that has a continuous slope at all points, except at the original input points. The result of natural neighbor linear interpolation can be visualized as producing a snugly fit sheet stretched over all of the input data.
The interpolation method in Natgrid also allows for natural neighbor linear interpolation augmented by blending in gradient estimates. This latter is referred to as natural neighbor nonlinear interpolation. Natural neighbor nonlinear interpolation produces an interpolated surface that has a continuous slope at all locations; two tautness parameters can be set by the user to control the apparent smoothness of the output surface.
If you are interested in the details of the interpolation method used in Natgrid, you will want to buy Dr. Watson's book mentioned above.