In this article we are going to delve into the fascinating world of Trilinear interpolation. We will explore its origins, its relevance in today's society and its impact on different aspects of daily life. From the historical perspective to its evolution today, Trilinear interpolation has been the subject of study and debate, generating great interest among academics, lovers of the subject, and society in general. Through this article, we will seek to shed light on Trilinear interpolation, providing a panoramic view that allows the reader to understand its importance and influence in the contemporary world.
Method of multivariate interpolation on a 3-dimensional regular grid
Trilinear interpolation is the extension of linear interpolation, which operates in spaces with dimension, and bilinear interpolation, which operates with dimension , to dimension . These interpolation schemes all use polynomials of order 1, giving an accuracy of order 2, and it requires adjacent pre-defined values surrounding the interpolation point. There are several ways to arrive at trilinear interpolation, which is equivalent to 3-dimensional tensorB-spline interpolation of order 1, and the trilinear interpolation operator is also a tensor product of 3 linear interpolation operators.
Eight corner points on a cube surrounding the interpolation point C
On a periodic and cubic lattice, let , , and
be the differences between each of , , and the smaller coordinate related, that is:
where indicates the lattice point below , and indicates the lattice point above and similarly for
and .
First one interpolates along (imagine one is "pushing" the face of the cube defined by to the opposing face, defined by ), giving:
Where means the function value of Then one interpolates these values (along , "pushing" from to ), giving:
Finally one interpolates these values along (walking through a line):
This gives us a predicted value for the point.
The result of trilinear interpolation is independent of the order of the interpolation steps along the three axes: any other order, for instance along , then along , and finally along , produces the same value.
Algorithm visualization
A geometric visualisation of trilinear interpolation. The product of the value at the desired point and the entire volume is equal to the sum of the products of the value at each corner and the partial volume diagonally opposite the corner.
The above operations can be visualized as follows: First we find the eight corners of a cube that surround our point of interest. These corners have the values , , , , , , , .
Next, we perform linear interpolation between and to find , and to find , and to find , and to find .
Now we do interpolation between and to find , and to find . Finally, we calculate the value via linear interpolation of and
In practice, a trilinear interpolation is identical to two bilinear interpolation combined with a linear interpolation:
Alternative algorithm
An alternative way to write the solution to the interpolation problem is
where the coefficients are found by solving the linear system
pseudo-code from NASA, describes an iterative inverse trilinear interpolation (given the vertices and the value of C find Xd, Yd and Zd).
Paul Bourke, Interpolation methods, 1999. Contains a very clever and simple method to find trilinear interpolation that is based on binary logic and can be extended to any dimension (Tetralinear, Pentalinear, ...).
Kenwright, Free-Form Tetrahedron Deformation. International Symposium on Visual Computing. Springer International Publishing, 2015 .