|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
| '''Trilinear interpolation''' is a method of [[multivariate interpolation]] on a [[Three dimensional space|3-dimensional]] [[regular grid]]. It approximates the value of an intermediate point <math>(x, y, z)</math> within the local axial rectangular [[prism (geometry)|prism]] linearly, using data on the lattice points. For an arbitrary, [[unstructured grid|unstructured mesh]] (as used in [[finite element]] analysis), other methods of interpolation must be used; if all the mesh elements are [[tetrahedron|tetrahedra]] (3D [[simplex|simplices]]), then [[barycentric_coordinates_(mathematics)#Barycentric_coordinates_on_tetrahedra|barycentric coordinates]] provide a straightforward procedure.
| | As they call me Gabrielle. I am a cashier and I'm doing pretty good financially. As your girl what I definitely like is going to karaoke but I haven't ever made a dime from it. My husband and I opt to reside in Guam but I will have actually to move in a trustworthy year or two. See all that is new on my blog here: http://circuspartypanama.com<br><br>Also visit my homepage - [http://circuspartypanama.com clash of Clans cheats deutsch] |
| | |
| Trilinear interpolation is frequently used in [[numerical analysis]], [[data analysis]], and [[computer graphics]].
| |
| | |
| == Compared to linear and bilinear interpolation ==
| |
| | |
| Trilinear interpolation is the extension of [[linear interpolation]], which operates in spaces with [[dimension]] <math>D=1</math>, and [[bilinear interpolation]], which operates with dimension <math>D=2</math>, to dimension <math>D=3</math>. The order of accuracy is 1 for all these interpolation schemes, and it requires <math>(1 + n)^D = 8</math> adjacent pre-defined values surrounding the interpolation point. There are several ways to arrive at trilinear interpolation, it 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.
| |
| | |
| ==Method==
| |
| | |
| On a periodic and cubic lattice, let <math>x_d</math>, <math>y_d</math>, and <math>z_d</math>
| |
| be the differences between each of <math>x</math>, <math>y</math>, <math>z</math> and the smaller coordinate related, that is:
| |
| | |
| :<math> \ x_d = (x - x_0)/(x_1 - x_0)</math>
| |
| :<math> \ y_d = (y - y_0)/(y_1 - y_0)</math>
| |
| :<math> \ z_d = (z - z_0)/(z_1 - z_0)</math>
| |
| | |
| where <math> x_0 </math> indicates the lattice point below <math> x </math>, and <math> x_1 </math> indicates the lattice point above <math> x </math> and similarly for
| |
| <math>y_0, y_1, z_0</math> and <math>z_1</math>.
| |
| [[Image:Enclosing_points2.svg|right|thumb|Eight corner points on a cube surrounding the interpolation point C]]
| |
| [[Image:3D_interpolation2.svg|right|thumb|Depiction of 3D interpolation]]
| |
| | |
| First we interpolate along <math>x</math> (imagine we are pushing the front face of the cube to the back), giving:
| |
| | |
| :<math> \ c_{00} = V[x_0,y_0, z_0] (1 - x_d) + V[x_1, y_0, z_0] x_d </math>
| |
| :<math> \ c_{10} = V[x_0,y_1, z_0] (1 - x_d) + V[x_1, y_1, z_0] x_d </math>
| |
| :<math> \ c_{01} = V[x_0,y_0, z_1] (1 - x_d) + V[x_1, y_0, z_1] x_d </math>
| |
| :<math> \ c_{11} = V[x_0,y_1, z_1] (1 - x_d) + V[x_1, y_1, z_1] x_d </math> | |
| | |
| Where <math>V[x_0,y_0, z_0]</math> means the function value of <math> (x_0,y_0,z_0). </math>
| |
| Then we interpolate these values (along <math>y</math>, as we were pushing the top edge to the bottom), giving:
| |
| | |
| :<math> \ c_0 = c_{00}(1 - y_d) + c_{10}y_d</math>
| |
| :<math> \ c_1 = c_{01}(1 - y_d) + c_{11}y_d</math>
| |
| | |
| Finally we interpolate these values along <math>z</math>(walking through a line):
| |
| | |
| :<math> \ c = c_0(1 - z_d) + c_1z_d .</math>
| |
| | |
| 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 <math>x</math>, then along <math>y</math>, and finally along <math>z</math>, produces the same value.
| |
| | |
| 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 C000, C100, C010, C110, C001, C101, C011, C111.
| |
| | |
| Next, we perform linear interpolation between C000 and C100 to find C00, C001 and C101 to find C01, C011 and C111 to find C11, C010 and C110 to find C10.
| |
| | |
| Now we do interpolation between C00 and C10 to find C0, C01 and C11 to find C1. Finally, we calculate the value C via linear interpolation of C0 and C1
| |
| | |
| In practice, a trilinear interpolation is identical to three successive [[linear interpolation]]s, or a [[bilinear interpolation]] combined with a linear interpolation:
| |
| :<math> C \approx\ l( b(C_{000}, C_{010}, C_{100}, C_{110}), b(C_{001}, C_{011}, C_{101}, C_{111}))</math>
| |
| | |
| ==See also==
| |
| * [[Linear interpolation]]
| |
| * [[Bilinear interpolation]]
| |
| * [[Tricubic interpolation]]
| |
| * [[Radial interpolation]]
| |
| * [[Tetrahedral interpolation]]
| |
| | |
| ==External links==
| |
| *[http://www.grc.nasa.gov/WWW/winddocs/utilities/b4wind_guide/trilinear.html 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, [http://paulbourke.net/miscellaneous/interpolation/ 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, ...).
| |
| | |
| [[Category:Multivariate interpolation]]
| |
As they call me Gabrielle. I am a cashier and I'm doing pretty good financially. As your girl what I definitely like is going to karaoke but I haven't ever made a dime from it. My husband and I opt to reside in Guam but I will have actually to move in a trustworthy year or two. See all that is new on my blog here: http://circuspartypanama.com
Also visit my homepage - clash of Clans cheats deutsch