13.11 Problems 243
The routine to subdivide a rational Bezier curve at a parameter value t was
already given in Section 5.8.
A program that generates the piecew^ise rational Bezier form from a rational
cubic B-spline curve is:
void ratbspline_to_bezier(bsp1_x,bspl_y,bspl_w,knot,l,bez_x,bez_y,bez_w)
/* converts rational cubic B-spline polygon into piecewise
rational Bezier polygon
Input: bspl_x, bspl_y: planar B-spline control polygon
bspl_w: B-spline weights
knot: knot sequence
1: no.
of
intervals
Output: bez_x, bez_y: planar piecewise Bezier polygon
bez_w: Bezier weights (not
in
piecewise standard form!)
V
1
5.11 Problems
1 Suppose you are given two coplanar rational quadratic segments that form
a C^ curve, but not a G^ curve. Can you adjust the weights (not the control
polygons!) such that the resulting new segments form a G^ curve? Hint: use
(10.9).
* 2 A rational Bezier curve may be
closed^
as in the example of a degree elevated
ellipse. Show that a nonplanar 3D rational cubic cannot be closed.
* 3 In Section 13.4, we said that signed curvature makes sense only in e. Why
not in ¥?}
*4 In Section 13.5, we remarked that the cross ratios of any four points
(b/,
q^, q^, b/_^i) are the same for all polygon legs. How is this cross ratio
related to the reparametrization constant c?
PI Define and program a rational Aitken algorithm, that is, one where the
data points are assigned weights. Try to adjust those weights in an attempt
to reduce the oscillatory behavior of the interpolant.
P2 Use deboor_blossom to write a degree elevation program for rational B-
splines. Apply it repeatedly and study the behavior of the weights.