splines interpolate a set of control
are guaranteed to pass
control points (except for the first and last points).
spline has the following properties:
- It passes through the middle two points,
and interpolates the space between them
- The tangents at p1 and p2
there are four
will have four
the spline equation (i.e., we will have a cubic spline ).
Cubic spline equation:
is to derive a, b, c and d using the constraints.
then give the precise form of x(t)
linear equations with four unknowns:
is easily solved using algebra to determine a
, and d
four equations can be solved, giving the result:
Given four control points (p0, p1, p2, p3
can compute a
. Then, we can sample the curve
at regular intervals along the
1] to generate points along the spline spanning the space between p1