Bilinear and Trilinear Interpolations
Bilinear and Trilinear Interpolations
Bilinear Interpolation:
It is an extension of the linear interpolation for interpolating
functions of, for example, two variables x , and y . The
basic idea is to perform linear interpolation first in one
direction and then in the other direction. For this one needs
to write Lagrange polynomial for x and then for y , which
further will be combined to get a single relationship, i.e., a
function f (x, y).
To start the algorithm first thing which is needed is the
number of x, and y, data points along with the
function values at these given x , and y points.
Let the given data be x0, x1, y0, y1,and f (x0, y0), f (x0, y1),
f (x1, y0), f (x1, y1).
The above equation contains f (x0, y), and f (x1, y), that are
obtainable from equation (2), just by inserting x0, and x1,
respectively.
Hence using equation (4) and (5) in (3), one finally obtains
1 1
f (x, y) = Σ Σ f (xi , yj )L1,i (x)L1,j (y)
i=0 j=0
We obtain f(x,y)=-0.150923620xy+0.3200838460x
+0.0100615750y-0.02133892315
And
f(0.15,0.31)=0.02277479367
The above equation contains f (x0, y), and f (x1, y), that are
obtainable from equation (9), just by inserting x0, and x1,
respectively.
Hence using equation (11) and (12) in (10), one finally obtains
1 2
f (x, y) = Σ Σ f (xi , yj )L1,i (x)L2,j (y)
i=0 j=0
We obtain f(x,y)=0.307525445x+0.004320592y-0.06480887xy
-0.14352457xy2+0.009568304y2-0.0205016965
and
f(0.19,0.39)=0.03211845415
Bilinear and Trilinear Interpolations
Trilinear Interpolation
Trilinear Interpolation:
To interpolate functions of three variables x , y , and z , one
has to perform linear interpolations in three directions, i.e., in
x, y, and z, directions. For this one needs to write Lagrange
polynomials in these three directions, which further will be
combined to get a single relationship, i.e., a function
f (x, y, z).
Let the given data be x0, x1, y0, y1, z0, z1,and f (x0, y0, z0),
f (x0, y0, z1), f (x0, y1, z0), f (x0, y1, z1), f (x1, y0, z0),
f (x1, y0, z1), f (x1, y1, z0), f (x1, y1, z1).
The above equation contains f (x0, y), and f (x1, y), that are
obtainable from equation (16), just by inserting x0, and x1,
respectively.
p q
f (x, y) = Σ Σ f(x i,,y j)L p,i (x)L q,j (y), (25)
i=0 j=0
and
p q r
f (x, y, z) = Σ Σ Σ f (x i, y j, z k)L p,i (x)L q,j (y)L r,k (z). (26)
i=0 j=0 k=0