This crate contains an implementation of Radial Basis Function multidimensional interpolation. For an excellent introduction to the topic, see the SIGGRAPH 2014 course notes.
The input is a set of datapoints, each of which has coordinates in some multidimensional
space, and a value, also provided as a vector. For example, for the colorfield images below,
the coordinates are 2D, and the values are a 3-vector, one each for red, green, and blue.
The result is a Scatter
struct that can then be evaluated at any coordinate. The idea
is that the values vary smoothly with the coordinates, but coincide with the input at each
of the provided datapoints.
There are a number of approaches to multidimensional interpolation, but the focus of this crate is the family of radial basis functions. These include [Polyharmonic splines], of which the thin plate spline is an instance, a Gaussian radial basis function, and others (muti-quadric and inverse multi-quadric). The Gaussian and multi-quadric variants have a tunable size parameter.
In addition, there is an "order" parameter that controls low-order polynomial terms. An order of 0 means no additional terms, just pure basis functions. An order of 1 means a constant term, and and order of 2 means an affine term. With these additional terms, there is a "best-fit" constant or affine approximation of the input, and the basis functions are layered. (For a more precise description, see section 3.1 of the SIGGRAPH notes). Note that even higher order polynomials make sense, but are not implemented currently.