## Cubic B-Splines

Cubic B-splines are different than Hermite, and Bezier curves in a couple of ways.

1. The curves generated by cubic B-Spline formulation do not pass through the control points -- only near them.
2. The curves generated are an interpolation of segments of $t$, and not points at $t$.

Unlike Hermite, and Bezier curves, where they can generate equivalent curves, the cubic B-spline is different.

This discussion is limited to uniform B-splines.

A uniform B-spline consists of control points $P_0 ... P_n$, and is defined by the following conditional expression:

We are interested in interpolating a single segment for a B-spline. For example, given four control points, $P_0 = (0.2, 0), P_1 = (0.2, 0.2), P_2 = (0.5, 0.2), P_3 = (0.5, 0)$, we can interpolate a single segment which comes close to point $P_1$, and $P_2$. Controlling the other two endpoints, $P_0$, and $P_2$ controls the curvature of the segment.

We can compute a B-spline quickly by using the matrix representation, given $\bold{T} = \begin{bmatrix} 1 & t & t^2 & t^3 \end{bmatrix}$

Where $\bold{G}$ represents the collection of control points for the particular segment to be interpolated.

$j$ in this case, presents the segment to be interpolated. So, if we want to interpolate the 2nd segment, we would the set of points would be: $P_2, P_3, P_4, P_5$.

The expression for the first segment looks like:

The below example interpolates many segments with the points:  We are able to generate beautiful curves this way!

### Limitations

With a finite set of control points, you cannot make a B-spline traverse a unit circle. We will need to use rational B-splines to achieve this.