Interpolating cubic Bspline
Bezier control points
Let us consider again bicubic uniform Bspline composed of n segments.
We know that Bspline doesn't interpolate its deBoor control points.
As since Bezier curve goes through its terminal control points we will use
Bezier points now.
We have seen (look at Fig.1), that to determine cubic Bspline we need to set
its (n+3) points. E.g. all control points of the first Bezier curve
and one independent "last" point for each new segment.
But it is more natural to set tangents at terminal points of the Bspline
(that is we will use V_{1} and W_{2}
points instead of V_{1} and V_{2}
in Fig.1).
Fig.1' shows, that all Bezier control points of the curve are evaluated from
two vectors (P_{0} , P_{1} , ... ,
P_{n}) and (d_{0} , d_{1} ,
... , d_{n}). Points (P_{0} ,
P_{1} , ... , P_{n}),
d_{0} , d_{n} are fixed and
d_{1} , d_{2} ,
... , d_{n1} should be calculated.
Interpolating Bspline applet (the right window).
Drag the mouse to move the nearest control point (a small blue
square). Click mouse + "Shift"("Ctrl") to add (remove) a point.
Solving banded equations
It is evident that by definition the curve
is C^{1} continuous. From C^{2} continuity it
follows, e.g.
P_{1}  2(P_{1} 
d_{1}) + (P_{0} + d_{0}) =
(P_{2}  d_{2})  2(P_{1} +
d_{1}) + P_{1} ,
d_{0} + 4d_{1} +
d_{2} = P_{2}  P_{0} .
In general case we get banded 3diagonals linear equations
4d_{1} + d_{2} =
P_{2}  P_{0}  d_{0}
d_{1} + 4d_{2} +
d_{3} = P_{3}  P_{1}
... ...
d_{i} + 4d_{i+1} +
d_{i+2} = P_{i+2}  P_{i}
... ...
d_{n2} + 4d_{n1} =
P_{n}  P_{n2}  d_{n}
We can successively express
d_{i} =
A_{i} + B_{i} d_{i+1} ,
i = 1 , 2 , ... , n1
where
A_{1} = (P_{2} 
P_{0}  d_{0})/4 ,
B_{2} = 1/4,
A_{i} = (P_{i+1} 
P_{i1}  A_{i1})/(4 + B_{i1}) ,
B_{i} = 1/(4 + B_{i1}) .
Then we will find d_{n1} and
d_{i} successively by iterations in reverse order
d_{n1} =
A_{n1} + B_{n1} d_{n} ,
d_{i} = ... .
It is programmed as (Bint.java)
public void findCPoints(){
Bi[1] = .25;
Ax[1] = (Px[2]  Px[0]  dx[0])/4; Ay[1] = (Py[2]  Py[0]  dy[0])/4;
for (int i = 2; i < N1; i++){
Bi[i] = 1/(4 + Bi[i1]);
Ax[i] = (Px[i+1]  Px[i1]  Ax[i1])*Bi[i];
Ay[i] = (Py[i+1]  Py[i1]  Ay[i1])*Bi[i]; }
for (int i = N2; i > 0; i){
dx[i] = Ax[i] + dx[i+1]*Bi[i]; dy[i] = Ay[i] + dy[i+1]*Bi[i]; }
}
You can compare here Interpolating Bspline and Cardinal curve.

Handling the terminal tangents
If you don't like to worry about terminal tangents of interpolating curve,
you can direct them to the nearest point as for Cardinal curve, i.e.
("1/3 rule" is used)
d_{0} = (P_{1} 
P_{0})/3, d_{n} =
(P_{n}  P_{n1})/3 .
Interpolating applet without terminal tangents.
Drag the mouse to move a control point.
Click mouse + "Shift"("Ctrl") to add (remove) a point.

We don't consider here closed curves, nonuniform splines and node insertion.
Don't you know the name of the interpolating Bspline?
Contents
Previous: Nonuniform Bsplines
Next: NURBS
updated 21 August 2001