Graphics Reference
In-Depth Information
22.7 Discussion and Further Reading
(0, 1)
( 2 1, 0)
(1, 0)
The web material for this chapter includes a much-expanded version of the mate-
rial you've just read, and includes topics such as spline paths that are “circular”
(i.e., that start and end at the same point, with the same tangent vector, so you
can use them for describing repeated motions). It also contains pointers to other
literature on the subject.
(2, 0)
(
2
2, 0)
Figure 22.12: The control poly-
gon at the top, when subdivided,
approaches the graph of b 3 (in
red), the cubic B-spline function.
The subdivision levels are drawn
vertically offset for clarity.
One of the early reasons for developing splines was to approximate other
functions with comparatively simple ones. This idea leads naturally to the use
of splines for compression: If you have a sequence of many data points that lie
on a fairly smooth curve, you can probably approximate that curve with a spline
curve defined by just a few control points, thus generating a lossy compression of
the data. This is really just a generalization of the idea of approximating data by
fitting lines to them, but it's quite powerful.
22.8 Exercises
Exercise 22.1: The four Hermite polynomials of Equation 22.1 control the shape
of the Hermite curve.
(a) Compute the derivative of each polynomial.
(b) Evaluate the derivatives at t = 0 and t = 1.
(c) Explain why only v and w affect the direction of the Hermite curve at the start
and end, while P and Q have no effect on these directions.
Exercise 22.2: An Hermite curve specification has a geometry matrix G H =
P , Q , v , w containing the two endpoints and their associated tangents. A Bézier
curve specification contains four points G B = P 1 P 2 P 3 P 4 . They each,
too, have associated basis matrices, which we'll call M H and M B , respectively.
(a) Show that if we pick
P 1 = P 2 = P + 1
1
3 w
3 v
P 3 = Q
P 4 = Q ,
(22.23)
then the Hermite curve defined by P , Q , v , and w is identical to the Bézier curve
defined by P 1 ,
, P 4 .
(b) Show that in this situation, in matrix form, we have
...
G B = G H S
(22.24)
11 00
00 10
0
= G H
.
(22.25)
1
3
00
1
3
00
1
(c) Using the fact that G B M B = G H M H , and part (b), show how to determine M H
from M B . (The equality of the two products holds because if At ( t )= Ct ( t )
for every t for two 4
4 matrices A and C , then A = C ; that's because the vectors
t ( 0 ) , t ( 1 ) , t ( 2 ) , and t ( 3 ) are linearly independent.)
Exercise 22.3: In the development of the Catmull-Rom spline, we talked about
placing a fictitious control point P 1 that's symmetric to P 1 about P 0 .
(a) Show that the point P 1 is given by P 0
×
( P 1
P 0 ) , and simplify.
 
 
 
Search WWH ::




Custom Search