Graphics Reference
In-Depth Information
But there is still a problem concerning the values associated with the knot
vector. Fortunately, there is an easy solution. One simple approach is to keep
the differences between t 1 ,t 2 and t 3 wholenumbers,e.g.0,1and2.But
what about the end conditions t 0 and t 4 ? To understand the resolution of this
problem, let's examine the action of the three terms over the range of the
parameter t . The three terms are
t
V 0
+ t 2
t 0
t 1 − t 0
t
t 2 − t 1
(9.36)
0 , 1
1 , 2
t
V 1
+ t 3
t 1
t
(9.37)
t 2
t 1
t 3
t 2
1 , 2
2 , 3
t
V 2
+ t 4
t 2
t
(9.38)
t 3
t 2
t 4
t 3
2 , 3
3 , 4
and I propose that the knot vector be initialized with the following values:
t 0
t 1
t 2
t 3
t 4
0
0
1
2
2
Remember that the subscripts of the ratios are the subscripts of t , not the
values of t .
Over the range t 0
t
t 1 , i.e. 0 to 0. Only the first ratio in (9.36) is
0
active and returns
0 . The algorithm must detect this condition and take
no action.
Over the range t 1
t 2 , i.e. 0 to 1. The first ratio of (9.36) is active
again, and over the range of t blends out V 0 . The first ratio of (9.37) is
also active, and over the range of t blends in V 1 .
t
Over the range t 2
t 3 , i.e. 1 to 2. The second ratio of (9.37) is active,
and over the range of t blends out V 1 . The first ratio of (9.38) is also active,
and over the range of t blends in V 2 .
t
Finally, over the range t 3
t
t 4 , i.e. 2 to 2. The second ratio of (9.38) is
0
active and returns
0 . Once more, the algorithm must detect this condition
and take no action.
This process results in a linear interpolation between V 0 ,V 1 and V 2 . If (9.36),
(9.37) and (9.38) are applied to coordinate values, the result is two straight
lines. This seems like a lot of work just to draw two lines, but the beauty
of the technique is that it will work with any number of points, and can be
developed for quadratic and higher interpolations.
A. Aitken developed the following recursive interpolant:
p i ( t )= t i + r
t
t i
t i + r
t
t i p r− 1
t i p r− 1
( t )+
i +1 ( t );
i
t i + r
r
=1 , ..n ;
(9.39)
i
=0 , ..n
r ;
 
Search WWH ::




Custom Search