Graphics Reference
In-Depth Information
3.2.5 Curve fitting to position-time pairs
If the animator has specific positional constraints that must be met at specific times, then the time-
parameterized space curve can be determined directly. Position-time pairs can be specified by the ani-
mator, as in Figure 3.22 , and the control points of the curve that produce an interpolating curve can be
computed from this information [ 6 ] .
For example, consider the case of fitting a B-spline 3 curve to values of the form ( P i , t i ), i ¼
1,
, j.
...
Given the form of B-spline curves shown in Equation 3.23 of degree k with n þ
1 defining control
vertices, and expanding in terms of the j given constraints (2
j ), Equation 3.24 results.
Put in matrix form, it becomes Equation 3.25 , in which the given points are in the column matrix P , the
unknown defining control vertices are in the column matrix B , and N is the matrix of basis functions
evaluated at the given times ( t 1 ,
k n þ
1
t 2 ,
,
t j ).
...
1
PðtÞ¼
1 B i N i;k ðtÞ
(3.23)
P 1
¼ N 1 ;k ðt 1 ÞB 1 þ N 2 ;k ðt 1 ÞB 2 þ ... þ N 1 ;k ðt 1 ÞB 1
P 2
¼ N 1 ;k ðt 2 ÞB 1 þ N 2 ;k ðt 2 ÞB 2 þ ... þ N 1 ;k ðt 2 ÞB 1
(3.24)
...
P j
¼ N 1 ;k ðt j ÞB 1 þ N 2 ;k ðt j ÞB 2 þ ... þ N 1 ;k ðt j ÞB 1
P ¼ NB
(3.25)
¼
j ), then N is square and the defining control vertices can be solved by inverting the matrix, as in
Equation 3.26 .
If there are the same number of given data points as there are unknown control points (2
knþ
1
B ¼ N 1
P
(3.26)
P 2
P 4
P 1
time 10
P 5
time 50
time
0
time
55
P 3
P 6
time 35
time 60
FIGURE 3.22
Position-time constraints.
3 Refer to Appendix B.5.12 for more information on B-spline curves.
 
Search WWH ::




Custom Search