11.5 Interpolating G^ Cubic Splines 199
11.5 Interpolating C^ Cubic Splines
We may also use G^ cubics to interpolate to given data points x^; / = 0,. . ., L.
In the C^ case, we had to supply a knot sequence in addition to the data points.
Now, we have to specify a sequence of pairs a^,
coi.
How to do this effectively is
still an unsolved problem, so let us assume for now that a reasonable sequence
of
Qfp coi
is given. Setting b3/ = x^, (11.14) yields
d,+i + y/^iOti+A+2,
/•
= 1,..., L - 1. (11.17)
Together with two end conditions, we then have L
— 1
equations for the L + 1
unknowns d^. A suitable end condition is to make d^ a linear combination of
the first three data points: d^ =
WXQ
+ v^\ + wi^i. In our experience, (w,
v^
w) =
(5/6,1/2,
—1/3) has worked well. A similar equation then holds for
dj^^^.
For
the limiting case of aj -> 0 and
coi
-^ 1, the interpolating curve will approach the
polygon formed by the data points. In terms of the y formulation, this spline
type was investigated in
[209].
Nielson [442] derived the G^ interpolating spline from the v formulation.
Assuming that the data points x^ have parameter values
TJ
assigned to them, and
using the piecewise cubic Hermite form, the interpolant becomes
xiu) = x^H^ir) + m,A,Hl{r) + A,m,+iH|(r) +
x,_,^Hl(r),
(11.18)
where the
Hj*
are cubic Hermite polynomials from (7.14) and r = (u
—
r^)/A^ is
the local parameter of the interval (r/, r/+i). In (11.18), the
x^
are the known data
points, whereas the m^ are as yet unknown tangent vectors. The interpolant is
supposed to be G^; it is therefore characterized by (11.6), more specifically,
x+(T,)-x_(T,) = y,m, (11.19)
for some constants v^, where m^ = x(r^). The
Vj
are constants that can be used to
manipulate the shape of the interpolant; they will be discussed soon. We insert
(11.18) into (11.19) and obtain the linear system
(
A;AX; 1 A;_iAX;\ ^ ^1
^-^i + 'I = A,m,_i + (2A,_i + 2 A, + - A,_iA,y,)m,
A,_i A, / 2
+ A,_im,+i;/=l,...,L-l (11.20)