SPLINE FUNCTIONS

Let a function, be S, takes values from an interval [a,b] and maps them to \mathbb {R} , the set of real numbers

{\displaystyle S:[a,b]\to \mathbb {R} .}

We want S to be piecewise defined. To accomplish this, let the interval [a,b] be covered by k ordered,disjoint subintervals,

 {\displaystyle [t_{i},t_{i+1}]{\mbox{ , }}i=0,\ldots ,k-1}
 {\displaystyle [a,b]=[t_{0},t_{1}]\cup [t_{1},t_{2}]\cup \cdots \cup [t_{k-2},t_{k-1}]\cup [t_{k-1},t_{k}]}
 {\displaystyle a=t_{0}\leq t_{1}\leq \cdots \leq t_{k-1}\leq t_{k}=b}

On each of these k “pieces” of [a,b], we want to define a polynomial, call it Pi.

 {\displaystyle P_{i}:[t_{i},t_{i+1}]\to \mathbb {R} }.

On the ith subinterval of [a,b], S is defined by Pi,

 {\displaystyle S(t)=P_{0}(t){\mbox{ , }}t_{0}\leq t<t_{1},}
 {\displaystyle S(t)=P_{1}(t){\mbox{ , }}t_{1}\leq t<t_{2},}
 
 {\displaystyle S(t)=P_{k-1}(t){\mbox{ , }}t_{k-1}\leq t\leq t_{k}.}

The given k+1 points ti are called knots. The vector  {\displaystyle {\mathbf {t}}=(t_{0},\dots ,t_{k})} is called a knot vector for the spline. If the knots are equidistantly distributed in the interval [a,b] we say the spline is uniform, otherwise we say it is non-uniform.

If the polynomial pieces Pi each have degree at most n, then the spline is said to be of degree  \leq n (or of order n+1).

 

It might be asked what meaning more than n multiple knots in a knot vector have, since this would lead to continuities like

 {\displaystyle S(t)\in C^{-m}{\mbox{ , }}m>0}

at the location of this high multiplicity. By convention, any such situation indicates a simple discontinuity between the two adjacent polynomial pieces. This means that if a knot tiappears more than n + 1 times in an extended knot vector, all instances of it in excess of the (n + 1)th can be removed without changing the character of the spline, since all multiplicities n + 1, n + 2, n + 3, etc. have the same meaning. It is commonly assumed that any knot vector defining any type of spline has been culled in this fashion.

The classical spline type of degree n used in numerical analysis has continuity

 {\displaystyle S(t)\in \mathrm {C} ^{n-1}[a,b],\,}

which means that every two adjacent polynomial pieces meet in their value and first n – 1 derivatives at each knot. The mathematical spline that most closely models the flat spline is a cubic (n = 3), twice continuously differentiable (C2), natural spline, which is a spline of this classical type with additional conditions imposed at endpoints a and b.

Another type of spline that is much used in graphics, for example in drawing programs such as  adobe illustrator from Adobe systems, has pieces that are cubic but has continuity only at most

 {\displaystyle S(t)\in \mathrm {C} ^{1}[a,b].}

This spline type is also used in post script as well as in the definition of some computer typographic fonts.

Many computer-aided design systems that are designed for high-end graphics and animation use extended knot vectors

If sampled data from a function or a physical object is available, spline interpolation is an approach to creating a spline that approximates that data.

General Expression For a C2 Interpolating Cubic Spline

The general expression for the ith C2 interpolating cubic spline at a point x with the natural condition can be found using the formula

 {\displaystyle S_{i}(x)={\frac {z_{i}(x-t_{i-1})^{3}}{6h_{i}}}+{\frac {z_{i-1}(t_{i}-x)^{3}}{6h_{i}}}+\left[{\frac {f(t_{i})}{h_{i}}}-{\frac {z_{i}h_{i}}{6}}\right](x-t_{i-1})+\left[{\frac {f(t_{i-1})}{h_{i}}}-{\frac {z_{i-1}h_{i}}{6}}\right](t_{i}-x)}

where

  •  {\displaystyle z_{i}=f^{\prime \prime }(t_{i})} are the values of the second derivative at the ith knot.
  •  {\displaystyle h_{i}^{}=t_{i}-t_{i-1}}
  •  {\displaystyle f(t_{i}^{})} are the values of the function at the ith knot.