Graphics Reference
In-Depth Information
Example: Compute the quadratic periodic basis functions.
Since the degree = 2, we have m = 3. Also, let us choose, n = 3 in equation
(5.1); i.e., we consider four control points: V 0 , V 1 , V 2 ,and V 3 . Hence, we need
to compute four basis functions, namely B 0 , 3 , B 1 , 3 , B 2 , 3 ,and B 3 , 3 .
We can compute using equation (5.6)
B 0 , 3 B 1 , 3 B 2 , 3 B 3 , 3
B 0 , 2 B 1 , 2 B 2 , 2 B 3 , 2 B 4 , 2
B 0 , 1 B 1 , 1 B 2 , 1 B 3 , 1 B 4 , 1 B 5 , 1 .
The inverse functions can be written using equation (5.7):
B 0 , 3 B 1 , 3 B 2 , 3 B 3 , 3 B 4 , 3 B 5 , 3
B 0 , 2 B 1 , 2 B 2 , 2 B 3 , 2 B 4 , 2
B 0 , 1 B 1 , 1 B 2 , 1 B 3 , 1 .
Let us now find out the knot vector. From equation (5.2), it is clear that B 5 , 1
needs the knots t 5 and t 6 . The total number of knots is, therefore, n + m +1 =
3 + 3 + 1 = 7. Hence, the knot vector is t = [0123456], i.e., t 0 =0,
···
t n + m = t 3+3= t 6 .
5.3.1 Computation of Uniform Periodic B-spline Basis
The blending functions for a uniform periodic B-splines are also periodic.
This means for all values of n and m , all the blending functions have the same
shape. Each successive blending function is a shifted version of the previous
function. Hence,
B i,m ( u )= B i +1 ,m ( u +
u )
(5.8)
= B i +2 ,m ( u +2
u ) ,
where
u is the interval between adjacent knot values.
Example: Computation of a uniform quadratic B-spline basis functions.
Let us now compute the blending functions corresponding to a uniform
quadratic B-spline. For a quadratic B-spline, the order is 3. Hence we choose
n=3. This means we have four control points. We, therefore, have four basis
or blending functions, e.g., B 0 , 3 , B 1 , 3 , B 2 , 3 ,and B 3 , 3 . Each of these blending
functions is defined over m subintervals. The total number of knots is n +
m + 1, which is 7 in the present case [0 , 1 , 2 , 3 , 4 , 5 , 6 , 7]. The total number of
subintervals is, therefore, 6. The parameter u ranges from 0 to n + m or 6.
Now,
B 0 , 3 ( u )= u t 0
t 3 −u
t 3
B 0 , 2 +
B 1 , 2
t 2
t 0
t 1
1
2 uB 0 , 2 + 2 (3
=
u ) B 1 , 2
1
2 u u−t 0
t 0 B 0 , 1 + 2 u t 2 u
=
t 1 B 1 , 1
t 1
t 2
+ 2 (3
u ) u−t 1
t 2
t 1 B 1 , 1 + 2 (3
u ) t 3 u
t 3
t 2 B 2 , 1
(5.9)
1
2 u 2 B 0 , 1 +
1
=
{
2 u (2
u )
+ 2 (3
u )( u
1)
}
B 1 , 1
+ 2 (3
u ) 2 B 2 , 1 .
 
Search WWH ::




Custom Search