Graphics Reference
In-Depth Information
n
Â
()
wN
u
p
iik
,
i
()
()
Au
wu
()
=
i
=
0
pu
=
.
n
Â
()
wN
u
iik
,
i
=
0
The quotient rule for derivatives implies that
¢
()
-¢
()()
()
Au wupu
wu
¢
()
=
pu
,
so that p¢(u) can be computed applying Algorithm 11.5.4.2 to the functions p(u), w(u),
and A(u). For higher derivatives, note that
(
d
)
(
d
)
()
=
(
()()
)
Au wupu
Applying Leibnitz's formula to the product on the right-hand side of this equation and
reorganizing the result leads to
d
d
i
Ê
Ë
ˆ
¯
Â
1
(
)
(
)
(
)
d
()
-
i
()
d i
-
()
Au
wup
u
(
d
)
i
=
()
=
pu
,
(11.107)
()
wu
The Problem:
Given an arbitrary B-spline curve
p (u) =
=
n
N
i,k
(u)
p
i
i
0
of order k and degree m = k - 1, to compute
all
the derivatives of p(u) up to order d at u.
procedure
Derivatives (
real array
knots [0.. ];
point array
ctrls [0.. ];
integer
m;
real
u;
integer
d;
ref point array
derivs [0.. ])
{
Inputs:
u
i
= knots[i] - the knots
p
i
= ctrls[i] - the control points
m - the degree of the B-spline basis functions
u - parameter value at which the function's derivatives are to be evaluated
d- highest derivative desired
u
m
< u
m+1
, u Œ [u
m
,u
m+1
) , d £ m
See text as to how knot and control point arrays need to be re-indexed before
calling this procedure and for the one special case where u Œ (u
m
,u
m
+
1
] .
Outputs:
derivs[0..d] - the 0
th
through dth derivatives of the curve at u
}
Algorithm 11.5.4.2.
A B-spline evaluation algorithm ([LeeE82]).