
176 Chapter 9 Constructing Spline Curves 
The centripetal parametrization is achieved by the following routine: 
void parameters(data_x,data_y,l,knot) 
/*
 Finds
 a
 centripetal parametrization for
 a
 given set 
of 2D data points. 
Input: data_x, data_y: input points, numbered from
 0 to
 1+2. 
1: number
 of
 intervals. 
Output: knot: knot sequence. Note:
 not
 (knot[l]=1.0)! 
Note: data_x[l], data_x[l+l] are not used! Same for data_y. 
*/ 
A calling sequence that uses the preceding programs might look like this: 
parameters(data_x,data_y,l,knot); 
set_up_system(knot,l,alpha,beta,gamma); 
1
 _u__system
 (al
 pha,
 beta,
 gamma,
 1,
 up,
 1
 ow); 
bessel_ends(data_x,knot,l); 
bessel_ends(data_y,knot,l); 
sol ve_system(up,low,gamma,!,data_x,bspl_x); 
solve_system(up,low,gamma,1,data_y,bspl_y); 
Here, we solved the 2D interpolation problem with given data points in data_ 
X, data_y, a knot sequence knot, and the resulting B-spline polygon in bspl_x, 
bspl__y. This calling sequence is realized in the routine c2_spl ine.c. 
9.10 Problems 
1 For the case of closed curves, C^ quadratic spline interpolation with uni-
form knots does not always have a solution. Why?^^ 
* 2 Show that interpolating splines reproduce cubic polynomial curves—that 
they have cubic precision. This means that if all data points p/ are read off 
from a cubic, p^ = c(w^), and the end tangent vectors are read off from the 
cubic, then the interpolating spline equals the original cubic. 
15 T. DeRose pointed this out to me.