Example
1. Construct the natural cubic spline for the 7
points
This requires that the spline has the second derivative endpoint
constraints
.
Solution 1.
The B-spline construction requires the two
nodes
and
that are out of the range of the abscissas
of
the given data points.
Thus we will construct the
in the following special way, with a formula for calculating the
equal spacing nodes.
Now start with the list structure for the data points
The ordinates are obtained by taking the second element in the
transpose of
.
The list structure or vector form of
is different from the subscript notation used in describing the
points.
To use the subscript notation we use the following formula for
locating ordinates.
Solve the system of equations for the coefficients.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Now form the spline. It is assumed that the cell
defining the basic B-spline function B[x] has been
evaluated as well as the functions for
and
.
Since the index on the summation
ranges from i = -1 to i = n+1 =
7 there are 9 terms in the sum
forming the B-spline.
Let's look at the graph.
![[Graphics:../Images/B-SplinesMod_gr_151.gif]](../Images/B-SplinesMod_gr_151.gif)
(c) John H. Mathews 2004