Graphics Reference
In-Depth Information
i
Â
(
) =
() ()
puv
,
N
u
p
v
(12.57a)
sk
,
s
sik
=- +
1
where
j
Â
() =
()
p
v
N
v
p
.
(12.57b)
s
t h
,
st
tjh
=- +
1
To carry out step (3) we use Algorithm 11.5.4.2 to compute each of the points p s (v)
in equation (12.57b) and then use it one more time to compute p(u,v) in equation
(12.57a), which, for fixed v, is just another B-spline curve.
To compute the partial derivatives of a B-spline surface p(u,v), consider the case
of ∂p/∂u. Since
j
p
u
Â
(
) =
() ()
uv
,
N
¢
u
p
v
,
(12.58)
sk
,
s
sik
=- +
1
computing the partial ∂p/∂u is no different than computing the ordinary derivative of
the B-spline curve q(u) = p(u,v). This can again be done with Algorithm 11.5.4.2. The
case of ∂p/∂v can be handled in a similar manner if we think of p(u,v) as a B-spline
curve in v and interchange the summation in equation (12.46). The best way to deal
with higher order of partial derivatives of p(u,v) is to have a separate algorithm (one
could use a modified version of Algorithm 11.5.4.2) that computes all the needed deriv-
atives of just the B-spline basis functions N s,k (u) and N t,h (v), puts these values into an
array, and then computes the appropriate linear combination of these values as spec-
ified by the mathematical formula for the partial derivative.
A NURBS surface p(u,v) can be evaluated using the approach that was used to
evaluate NURBS curves. If p ij = (x ij ,y ij ,z ij ), then p ij can be represented in homogeneous
coordinates by the point P ij = (w ij x ij ,w ij y ij ,w ij z ij ,w ij ). Let
m
n
Â
Â
(
) =
()
()
Puv
,
N
uN
v
P
.
(12.59)
ik
,
jh
,
ij
i
=
0
j
=
0
If P(u,v) = (P 1 (u,v), P 2 (u,v), P 3 (u,v), P 4 (u,v)), then
(
)
(
)
(
)
Puv
Puv
,
,
Puv
Puv
,
,
Puv
Puv
,
,
1
4
2
4
3
4
(
) =
puv
,
(
,
,
).
(
)
(
)
(
)
Therefore, compute P(u,v) thought of as a B-spline surface in R 4
and divide the first
three coordinates by P 4 (u,v) at the end to get p(u,v).
Partial derivatives of a NURBS surface are computed by formally differentiating
the right-hand expression in equation (12.53) similar to what we did for NURBS
curves in Section 11.5.4. The result then again consists of pieces that can be thought
of as ordinary B-spline surfaces or their derivatives, so that we can apply the methods
of evaluating those surfaces. For higher derivatives it is best to derive a recursive
Search WWH ::




Custom Search