
11.5 B-Spline Curves 551
The boundary condition S
0
(t
0
) = S
n−1
(t
n
) implies
b
0
= b
n−1
+ 2c
n−1
h
n−1
+ 3d
n−1
h
2
n−1
We also know that
b
0
=
a
1
− a
0
h
0
−
(2c
0
+ c
1
)h
0
3
b
n−1
=
a
n
− a
n−1
h
n−1
−
(2c
n−1
+ c
n
)h
n−1
3
d
n−1
=
c
n
− c
n−1
3h
n−1
Substituting these quantities in the last constraint yields
h
n−1
c
n−1
+ 2(h
n−1
+ h
0
)c
0
+ h
0
c
1
= 3
a
1
− a
0
h
0
−
a
0
− a
n−1
h
n−1
(11.18)
Equations (11.12), (11.17), and (11.18) form a linear system of equations. It is not
tridiagonal, but the cyclical nature of the matrix allows you to solve the system in
O(n) time.
The natural-, clamped-, and closed-spline interpolations were defined for fitting
a sequence of scalar values, but they can be simply extended to curves