Graphics Reference
In-Depth Information
The Problem: Given an arbitrary NURBS curve
n
S
wN (u)
p
i
i,k
i
A(u)
w(u) ,
i
=
0
p (u) =
=
n
S
wN (u)
i
i,k
i
=
0
to compute all the derivatives of p(u) up to order d at u.
Given:
Aderivs[0..d] - the 0 th through dth derivatives of A(u) at u
wderivs[0..d] - the 0 th through dth derivatives of w(u) at u
binom[..,..] - precomputed table of binomial coefficients, binom[i,j] = ()
i
j
Outputs:
derivs[0..d] - the 0 th through dth derivatives of the curve p(u) at u
integer i, j;
real s;
for i:=0 to d do
begin
s := Aderivs[i];
for j:=1 to i do s := s - binom[i,j]*wderivs[j]*derivs[i-j];
derivs[i] := s/wderivs[0];
end ;
Algorithm 11.5.4.4.
A NURBS curve derivatives algorithm.
Let D i = u i+1 - u i . It follows from the discussion following Example 11.5.2.11 that
D
b
D
DD
+
b
i
31
i
-
i
-
1 31
i
+
p
=
,
(11.108)
i
+
i
-
1
i
and that
D D
DD
D D D
DDD
DD D
DDD
q
+
+
q
10
01
b
=
,
2
0
1
+ ( )
++
q
+
q
ii
-
1
i
-
2
i
-
1
i
b
=
,
i
=
2
,...,
n
-
1
,
31
i
-
i
-
2
i
-
1
i
(
) +
++
+
q
q
i
i
+
1
i
i
-
1
i
+
1
b
=
,
i
=
1
,...,
n -
2
,
and
31
i
+
i
-
1
i
i
+
1
D
q
D
DD
+
+
q
nn
--
11
n n
- -
2 2
b
=
.
(11.109)
32
n
-
n
-
2
n
-
1
Search WWH ::




Custom Search