article

Trilinear interpolation is a method of performing interpolation on a 3-dimensional tensor product grid (possibly with an arbitrary, non-overlapping grid points in each dimension, but i.e. not an arbitrarily triangularized finite element mesh) of discretely sampled data. It approximates the value of an intermediate point (x, y, z) within the local axial rectangular prism linearly, using data on the lattice points.

Trilinear interpolation is frequently used in numerical analysis, data analysis, and computer graphics.

Properties, relation to linear interpolation and bilinear interpolation


  • Trilinear interpolation operates in a parameter space with dimension D = 3 (bilinear: D = 2, linear: D = 1) of order n = 1, thus requiring (1 + n)^D = 8 adjacent pre-defined values surrounding the interpolation point.
  • Trilinear interpolation is equivalent to 3-dimensional tensor B-spline interpolation of order 1.
  • The trilinear interpolation operator is a tensor product of 3 linear interpolation operators.

Example


On a periodic and cubic lattice with spacing 1, let

x_d, y_d, z_d
be the differences to the largest integer smaller than each of

x, y, z,

that is:

x_d = x - \lfloor x \rfloor

y_d = y - \lfloor y \rfloor

z_d = z - \lfloor z \rfloor

First we interpolate along z, giving:

i_1 = vx \rfloor,\lfloor y \rfloor, \lfloor z \rfloor \times (1 - z_d) + vx \rfloor, \lfloor y \rfloor, \lceil z \rceil \times z_d

i_2 = vx \rfloor,\lceil y \rceil, \lfloor z \rfloor \times (1 - z_d) + vx \rfloor, \lceil y \rceil, \lceil z \rceil \times z_d

j_1 = vx \rceil,\lfloor y \rfloor, \lfloor z \rfloor \times (1 - z_d) + vx \rceil, \lfloor y \rfloor, \lceil z \rceil \times z_d

j_2 = vx \rceil,\lceil y \rceil, \lfloor z \rfloor \times (1 - z_d) + vx \rceil, \lceil y \rceil, \lceil z \rceil \times z_d.

Then we interpolate these values (along y), giving:

w_1 = i_1(1 - y_d) + i_2y_d

w_2 = j_1(1 - y_d) + j_2y_d

Finally we interpolate these value along x:

IV = w_1(1 - x_d) + w_2x_d .

This gives us a predicted value for the point.

The result of trilinear interpolation is independent of the order of the successive interpolation steps, that is, performing the linear interpolations in another order of dimensions, along x, along y, then along z, produces an identical expression for the predicted value. This also follows immediately from the property of tensor products being commutative.

See also


Interpolation

 

This article is licensed under the GNU Free Documentation License. It uses material from the "Trilinear interpolation".

Home Pageartsbusinesscomputersgameshealthhospitalshomekids & teensnewsphysiciansrecreationreferenceregionalscienceshoppingsocietysportsworld