Imagine that you have a bunch of points in R3, each with a value (say, temperature). You want to construct a regular grid in R3 and compute a value at each grid point, such that if you then use trilinear interpolation at each of the input points, the computed values will minimize the least-squares error to the actual values. In other words, you'd like to figure out a set of values at regular grid points that will best approximate the actual data points you have.
There are several papers and implementations for the 1D version of this problem. Does anybody have any pointers to how to solve the 3D version?
With further reading, I think I need to use a polyharmonic spline.