The one-dimensional B-spline can be generalized to two or more dimensions. To do this, we can construct a two-dimensional basis consisting of the tensor product of one-dimensional basis functions in each direction. For example, for a 1D cubic B-spline, their are four non-zero basis functions at each point, x. In 2D, we construct a 1D basis for x and y separately, then construct the 2D basis as the tensor product and of the x and y basis functions. Thus, for each point in the 2D space, their are 16 nonzero product basis functions. Similarly, in 3D, there are 64 nonzero basis functions which contribute a tricubic B-spline. 4D B-splines could also be constructed, but are not implemented in the einspline library at this time. The great advantage of B-splines is that the number of floating point value which needs to be stored per mesh point does not increase with dimensionality. In contrast, the more commonly used splines required 2d floating point values per mesh point. Thus, we save a factor of 8 in storage in 3D. Furthermore, the B-splines can be made to give exactly the same result as standard splines, within numerical round-off error. |
A multi-dimensional interpolating B-spline can be constructed solving the interpolating equations for each direction in sequence. That is, for a 2D spline, we first solve the interpolating equations in the x direction for each value of y, using the data to be interpolated, F(xi, yj), as the right-hand-sides (RHS) of the equations. This yields of set of coefficients, Fx(xi, yj). We then solve the interpolating equations in the y direction, using these Fx coefficients as the RHS, yielding the final 2D B-spline coefficients. |