HOME

TheInfoList



OR:

In the
mathematical Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
subfield
numerical analysis Numerical analysis is the study of algorithms that use numerical approximation (as opposed to symbolic computation, symbolic manipulations) for the problems of mathematical analysis (as distinguished from discrete mathematics). It is the study of ...
, tricubic interpolation is a method for obtaining values at arbitrary points in
3D space Three-dimensional space (also: 3D space, 3-space or, rarely, tri-dimensional space) is a geometric setting in which three values (called ''parameters'') are required to determine the position of an element (i.e., point). This is the informal ...
of a function defined on a
regular grid A regular grid is a tessellation of ''n''-dimensional Euclidean space by congruent parallelotopes (e.g. bricks). Its opposite is irregular grid. Grids of this type appear on graph paper and may be used in finite element analysis, finite volume ...
. The approach involves approximating the function locally by an expression of the form :f(x,y,z)=\sum_^3 \sum_^3 \sum_^3 a_ x^i y^j z^k. This form has 64 coefficients a_; requiring the function to have a given value or given
directional derivative In mathematics, the directional derivative of a multivariable differentiable (scalar) function along a given vector v at a given point x intuitively represents the instantaneous rate of change of the function, moving through x with a velocity s ...
at a point places one linear constraint on the 64 coefficients. The term ''tricubic interpolation'' is used in more than one context; some experiments measure both the value of a function and its spatial derivatives, and it is desirable to interpolate preserving the values and the measured derivatives at the grid points. Those provide 32 constraints on the coefficients, and another 32 constraints can be provided by requiring smoothness of higher derivatives.Tricubic Interpolation in Three Dimensions (2005), by F. Lekien, J. Marsden, Journal of Numerical Methods and Engineering
/ref> In other contexts, we can obtain the 64 coefficients by considering a 3×3×3 grid of small cubes surrounding the cube inside which we evaluate the function, and fitting the function at the 64 points on the corners of this grid. The
cubic interpolation In numerical analysis, a cubic Hermite spline or cubic Hermite interpolator is a spline where each piece is a third-degree polynomial specified in Hermite form, that is, by its values and first derivatives at the end points of the corresponding ...
article indicates that the method is equivalent to a sequential application of one-dimensional cubic interpolators. Let \mathrm_x(a_, a_0, a_1, a_2) be the value of a monovariable cubic polynomial (e.g. constrained by values, a_, a_, a_, a_ from consecutive grid points) evaluated at x. In many useful cases, these cubic polynomials have the form \mathrm_x(u_, u_0, u_1, u_2) = \mathbf_x \cdot \left( u_, u_0, u_1, u_2 \right) for some vector \mathbf_x which is a function of x alone. The tricubic interpolator is equivalent to: \begin s(i,j,k) & = \text (i,j,k)\\ t(i,j,z) & = \mathrm_z\left( s(i,j,-1), s(i,j,0), s(i,j,1), s(i,j,2)\right) \\ u(i,y,z) & = \mathrm_y\left( t(i,-1,z), t(i,0,z), t(i,1,z), t(i,2,z)\right) \\ f(x,y,z) & = \mathrm_x\left( u(-1,y,z), u(0,y,z), u(1,y,z), u(2,y,z)\right) \end where i,j,k\in\ and x,y,z\in ,1/math>. At first glance, it might seem more convenient to use the 21 calls to \mathrm described above instead of the matrix described in Lekien and Marsden. However, a proper implementation using a sparse format for the matrix (that is fairly sparse) makes the latter more efficient. This aspect is even much more pronounced when interpolation is needed at several locations inside the same cube. In this case, the matrix is used once to compute the interpolation coefficients for the entire cube. The coefficients are then stored and used for interpolation at any location inside the cube. In comparison, sequential use of one-dimensional integrators \mathrm{CINT}_x performs extremely poorly for repeated interpolations because each computational step must be repeated for each new location.


See also

*
Cubic interpolation In numerical analysis, a cubic Hermite spline or cubic Hermite interpolator is a spline where each piece is a third-degree polynomial specified in Hermite form, that is, by its values and first derivatives at the end points of the corresponding ...
* Bicubic interpolation *
Trilinear interpolation Trilinear interpolation is a method of multivariate interpolation on a 3-dimensional regular grid. It approximates the value of a function at an intermediate point (x, y, z) within the local axial rectangular prism linearly, using function data on ...


References


External links


Java/C++ implementation of tricubic interpolation

C++ implementation of tricubic interpolation

Python implementation

NumPy implementation


einspline library Multivariate interpolation