Trilinear interpolation

From Academic Kids

Trilinear interpolation is the process of taking a three-dimensional set of numbers and interpolating the values linearly, finding a point using a weighted average of eight values.

Contents

Overview

The idea behind three-dimensional interpolation is that having some periodic volume of discrete data you can predict the value of a non-integer <math>x, y, z<math> within the plane. This is done using data for integer coordinate positions in the plane and using this, the aim is to try to predict a value for these non-integer <math>x, y, z<math> positions.

Differences from linear interpolation and bilinear interpolation

  • Trilinear interpolation works over a volume of numbers rather than
    • Linear which works over a line of values
    • Bilinear which works over a plane of values
  • Trilinear interpolation works with eight values (these are the integer coordinate positions surrounding the point)

Example

In order to trilinearly interpolate we need to look at the eight values surrounding the value we want. Let

<math>x_f, y_f, z_f<math>

be the fractional parts of

<math>x, y, z<math>,

that is:

<math>x_f = x - \lfloor x \rfloor<math>
<math>y_f = y - \lfloor y \rfloor<math>
<math>z_f = z - \lfloor z \rfloor<math>

First we interpolate along <math>z<math>, giving:

<math>i_1 = v[\lfloor x \rfloor,\lfloor y \rfloor, \lfloor z \rfloor] \times (1 - z_f) + v[\lfloor x \rfloor, \lfloor y \rfloor, \lceil z \rceil] \times z_f<math>
<math>i_2 = v[\lfloor x \rfloor,\lceil y \rceil, \lfloor z \rfloor] \times (1 - z_f) + v[\lfloor x \rfloor, \lceil y \rceil, \lceil z \rceil] \times z_f<math>
<math>j_1 = v[\lceil x \rceil,\lfloor y \rfloor, \lfloor z \rfloor] \times (1 - z_f) + v[\lceil x \rceil, \lfloor y \rfloor, \lceil z \rceil] \times z_f<math>
<math>j_2 = v[\lceil x \rceil,\lceil y \rceil, \lfloor z \rfloor] \times (1 - z_f) + v[\lceil x \rceil, \lceil y \rceil, \lceil z \rceil] \times z_f.<math>

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

<math>w_1 = i_1(1 - y_f) + i_2y_f<math>
<math>w_2 = j_1(1 - y_f) + j_2y_f<math>

Finally we interpolate these value along <math>x<math>:

<math>IV = w_1(1 - x_f) + w_2x_f .<math>

This gives us a predicted value for the point.

Note that the result of trilinear interpolation is independent of the order of interpolation, that is, performing the linear interpolations in the other order, along <math>x<math>, along <math>y<math>, then along <math>z<math> horizontally, would also produce an equivalent expression for the predicted value.

See also

Navigation

Academic Kids Menu

  • Art and Cultures
    • Art (http://www.academickids.com/encyclopedia/index.php/Art)
    • Architecture (http://www.academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (http://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (http://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools