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 ) {\displaystyle (x,y,z)} within the local axial rectangular prism linearly, using function data on the lattice points. Trilinear interpolation is frequently used in numerical analysis, data analysis, and computer graphics.
Related methods Trilinear interpolation is the extension of linear interpolation, which operates in spaces with dimension D = 1 {\displaystyle D=1} , and bilinear interpolation, which operates with dimension D = 2 {\displaystyle D=2} , to dimension D = 3 {\displaystyle D=3} . These interpolation schemes all use polynomials of order 1, giving an accuracy of order 2, and it requires 2 D = 8 {\displaystyle 2^{D}=8} adjacent pre-defined values surrounding the interpolation point. There are several ways to arrive at trilinear interpolation, which is equivalent to 3-dimensional tensor B-spline interpolation of order 1, and the trilinear interpolation operator is also a tensor product of 3 linear interpolation operators. For an arbitrary, unstructured mesh (as used in finite element analysis), other methods of interpolation must be used; if all the mesh elements are tetrahedra (3D simplices), then barycentric coordinates provide a straightforward procedure.
Formulation
On a periodic and cubic lattice, we want the value at x {\displaystyle x} , y {\displaystyle y} , z {\displaystyle z} . In the general case, each coordinate (for example, x {\displaystyle x} ) is not exactly at a lattice point, but some distance between one lattice point x 0 {\displaystyle x_{\text{0}}} and the next, x 1 {\displaystyle x_{\text{1}}} . Let x d {\displaystyle x_{\text{d}}} be that fractional distance away from the lower lattice point: x − x 0 x 1 − x 0 {\displaystyle {\frac {x-x_{0}}{x_{1}-x_{0}}}} . Take a similar approach for the other coordinates:
x d = x − x 0 x 1 − x 0 y d = y − y 0 y 1 − y 0 z d = z − z 0 z 1 − z 0 {\displaystyle {\begin{aligned}x_{\text{d}}={\frac {x-x_{0}}{x_{1}-x_{0}}}\\y_{\text{d}}={\frac {y-y_{0}}{y_{1}-y_{0}}}\\z_{\text{d}}={\frac {z-z_{0}}{z_{1}-z_{0}}}\end{aligned}}}
… excerpt ends here. Continue reading the full article.




