Graphics Reference
In-Depth Information
3.5
3
2.5
1(1 t ) + 3 t
2
3 t
1.5
1
1(1
t )
0.5
0
0
0.1
0.2
0.3
0.4
0.5
t
0.6
0.7
0.8
0.9
1
Fig. 8.2. The top graph shows the result of linearly interpolating between values 1
and 3.
3.5
3
2.5
2
1.5
1
0.5
0
0
1
2
3
4
5
x
Fig. 8.3. Interpolating between the points (1, 1) and (4, 3). Note that linear changes
in t give rise to equal spaces along the line.
between two locations ( x 1 ,y 1 ,z 1 )and( x 2 ,y 2 ,z 2 ). The interpolated position
is given by
x = x 1 (1
t )+ x 2 t
y = y 1 (1 − t )+ y 2 t
z = z 1 (1
t )+ z 2 t
(8.5)
for 0
1 The parameter t could be generated from two frame values
within an animation. What is assured by this interpolant, is that equal steps
in t result in equal steps in x , y and z . Figure 8.3 illustrates this linear spacing
with a 2D example. We can write (8.2) in matrix form as follows:
t
n 1
n 2
n =[(1
t ) t ]
·
(8.6)
 
Search WWH ::




Custom Search