EasyManua.ls Logo

Texas Instruments TI-92+

Texas Instruments TI-92+
507 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Bilinear interpolation
If we are given four (x,y) points such that
f(x
1
,y
1
) = z
1
and x
2
> x
1
f(x
1
,y
2
) = z
2
y
2
> y
1
f(x
2
,y
1
) = z
3
f(x
2
,y
2
) = z
4
then we can solve for a function in four unknown coefficients. There are an infinite number of such
equations, but the most simple candidate is
z = ax + bx + cxy + d
so the system to solve for a, b, c and d is
ax
1
+ by
1
+ cx
1
y
1
+ d = z
1
ax
1
+ by
2
+ cx
1
y
2
+ d = z
2
ax
2
+ by
1
+ cx
2
y
1
+ d = z
3
ax
2
+ by
2
+ cx
2
y
2
+ d = z
4
We could solve this directly for a, b, c and d, but we can get a more simple solution by scaling x and y,
like this:
and
t =
xx
1
x
2
x
1
u =
yy
1
y
2
y
1
With this scaling, t = 0 when x = x
1
and t = 1 when x = x
2
. Similarly, u = 0 when y = y
1
and u = 1 when y
= y
2
. This equation system to solve simplifies to this:
d = z
1
or a = z
3
- z
1
b + d = z
2
b = z
2
- z
1
a + d = z
3
c = z
1
- z
2
- z
3
+ z
4
a + b + c + d = z
4
d = z
1
So the equation to estimate z in terms of t and u is
z = (z
3
- z
1
)t + (z
2
- z
1
)u + (z
1
- z
2
- z
3
+ z
4
)ut + z
1
We can expand this equation, collect on z
1
, z
2
, z
3
and z
4
, and further factor that result to get
z = z
1
(1-u)(1-t) + z
2
u(1-t) + z
3
t(1-u) + z
4
ut
The function bilinint() does the interpolation with this formula
bilinint(xa,xb,ya,yb,zaa,zab,zba,zbb,x,y)
Func
©(xa,xb,ya,yb,zaa,zab,zba,zbb,x,y) Lin interpolate z=f(x,y)
©8oct00 dburkett@infinet.com
local t,u
(x-xa)/(xb-xa)t
6 - 45

Table of Contents

Related product manuals