Graphics Reference
In-Depth Information
Returning to the uniform quadratic B-spline curves p(u) defined by (11.72), we
want to show that they can be computed very easily using matrices. Assume that
u Π[i,i+1). Since only N i,1 (u) is nonzero for such a u, formulas (11.72) and (11.77)
show that the coefficient of p j vanishes for all j except for j = i - 2, i - 1, or i. In other
words,
2
2
() = () +-
(
)
+ () -+
[
(
)
(
) ++-
(
)
(
)
]
+ () -
(
)
pu
12
i
1
u
p
12
ui
1
i
+-
1
u i
2
uui
-
p
12
ui
p .
i
-
2
i
-
1
i
Let q i-1 (u), u Π[0,1], be the restriction of p(u) to the interval [i,i+1] but reparame-
terized to [0,1]. Then
() = ( )
= () -
qupi
u
i
-
1
[
]
2
(
)
(
)
2
2
12 1
u
p
+-
2
u
+
2
u
+
1
p
+
u
p .
i
-
2
i
-
1
i
Notice how the coefficients of the points are independent of i. In matrix form (replac-
ing i by i + 1),
p
p
p
Ê
ˆ
i
-
1
() = (
)
2
Á
Á
˜
˜
qu
uu
1 M
,
(11.78)
i
s
2
i
Ë
¯
i
+
1
where M s2 is the quadratic uniform or periodic B-spline matrix defined by
121
220
110
-
Ê
ˆ
= ()
Á
Á
˜
M s2
12
-
˜ .
(11.79)
Ë
¯
The curve q i (u) is defined for 1 £ i £ n - 1 and u Œ [0,1]. It traces out the same set as
the original quadratic B-spline p(u) restricted to u in [i - 1,i]. Derivatives are now also
computed easily. For example,
p
p
p
Ê
ˆ
i
-
1
Á
Á
˜
˜
¢ () = (
)
qu
210
u
M
.
(11.80)
i
s
2
i
Ë
¯
i
+
1
Repeating the above steps in the case where p(u) is a uniform cubic B-spline pro-
duces a similar result. More precisely, if 1 £ i £ n - 2 and u Œ [0,1], then
p
p
p
p
Ê
ˆ
i
-
1
Á
Á
Á
˜
˜
˜
() = (
)
i
32
qu
uuu
1 M
,
(11.81)
i
s
3
i
+
1
Ë
¯
i
+
2
where M s3 is the cubic uniform or periodic B-spline matrix defined by
Search WWH ::




Custom Search