 Cubic Hermite spline

In the mathematical subfield of numerical analysis a cubic Hermite spline (also called cspline), named in honor of Charles Hermite, is a thirddegree spline with each polynomial of the spline in Hermite form. The Hermite form consists of two control points and two control tangents for each polynomial.
For interpolation on a grid with points x_{k} for k = 1,...,n, interpolation is performed on one subinterval (x_{k},x_{k + 1}) at a time (given that tangent values are predetermined). The subinterval (x_{k},x_{k + 1}) is normalized to (0,1) via t = (x − x_{k}) / (x_{k + 1} − x_{k}).
Contents
Interpolation on a single interval
Unit interval (0, 1)
On the unit interval (0,1), given a starting point p_{0} at t = 0 and an ending point p_{1} at t = 1 with starting tangent m_{0} at t = 0 and ending tangent m_{1} at t = 1, the polynomial can be defined by
where t ∈ [0, 1].
Interpolation on (x_{k}, x_{k+1})
Interpolating x in the interval (x_{k},x_{k + 1}) can now be done with the formula
with t = (x − x_{k}) / (x_{k + 1} − x_{k}) and h refers to the basis functions, defined below. Note that the tangent values have been scaled by x_{k + 1} − x_{k} compared to the equation on the unit interval.
Uniqueness
The formulae specified above are guaranteed to produce a unique path between the two points.
Proof:
Let Q(x) be another third degree polynomial satisfying the given boundary conditions. Define R(x) = Q(x) − P(x). Since both Q and P are third degree polynomials, R is at most a third degree polynomial. Furthermore: R(0) = Q(0) − P(0) = 0 (We assume both P and Q satisfy the boundary conditions)
 R(1) = 0
So R must be of the form:
 R(x) = ax(x − 1)(x − r)
 R'(x) = ax(x − 1) + ax(x − r) + a(x − 1)(x − r)
We know furthermore that:
 R'(0) = Q'(0) − P'(0) = 0
 R'(0) = 0 = ar.......................(1)
 R'(1) = Q'(1) − P'(1) = 0
 R'(1) = 0 = a(1 − r)...............(2)
Putting (1) and (2) together, we deduce that a = 0 and R = 0, thus P(x) = Q(x)
Representations
We can write the interpolation polynomial as
where h_{00},h_{10},h_{01},h_{11} are Hermite basis functions. These can be written in different ways, each way revealing different properties.
expanded factorized Bernstein h_{00}(t) 2t^{3} − 3t^{2} + 1 (1 + 2t)(1 − t)^{2} B_{0}(t) + B_{1}(t) h_{10}(t) t^{3} − 2t^{2} + t t(1 − t)^{2} h_{01}(t) − 2t^{3} + 3t^{2} t^{2}(3 − 2t) B_{3}(t) + B_{2}(t) h_{11}(t) t^{3} − t^{2} t^{2}(t − 1) The "expanded" column shows the representation used in the definition above. The "factorized" column shows immediately, that h_{10} and h_{11} are zero at the boundaries. You can further conclude that h_{01} and h_{11} have a zero of multiplicity 2 at 0 and h_{00} and h_{10} have such a zero at 1, thus they have slope 0 at those boundaries. The "Bernstein" column shows the decomposition of the Hermite basis functions into Bernstein polynomials of order 3:
Using this connection you can express cubic Hermite interpolation in terms of cubic Bézier curves with respect to the four values and do Hermite interpolation using the de Casteljau algorithm. It shows that in a cubic Bézier patch the two control points in the middle determine the tangents of the interpolation curve at the respective outer points.
Interpolating a data set
A data set, for k = 1,...,n, can be interpolated by applying the above procedure on each interval, where the tangents are chosen in a sensible manner, meaning that the tangents for intervals sharing endpoints are equal. The interpolated curve then consists of piecewise cubic Hermite splines, and is globally continuously differentiable in (t_{1},t_{n}).
The choice of tangents is nonunique, and there are several options available.
Finite difference
The simplest choice is the threepoint difference, not requiring constant interval lengths,
for internal points k = 2,...,n − 1, and onesided difference at the endpoints of the data set.
Cardinal spline
A cardinal spline is obtained^{[1]} if
is used to calculate the tangents. The parameter c is a tension parameter that must be in the interval (0,1). In some sense, this can be interpreted as the "length" of the tangent. c = 1 will yield all zero tangents, and c = 0 yields a Catmull–Rom spline.
Catmull–Rom spline
For tangents chosen to be
a Catmull–Rom spline is obtained, being a special case of a cardinal spline.
The curve is named after Edwin Catmull and Raphael (Raphie) Rom. In computer graphics, Catmull–Rom splines are frequently used to get smooth interpolated motion between key frames. For example, most camera path animations generated from discrete keyframes are handled using Catmull–Rom splines. They are popular mainly for being relatively easy to compute, guaranteeing that each key frame position will be hit exactly, and also guaranteeing that the tangents of the generated curve are continuous over multiple segments.
Kochanek–Bartels spline
Main article: Kochanek–Bartels splineA Kochanek–Bartels spline is a further generalization on how to choose the tangents given the data points , and , with three parameters possible, tension, bias and a continuity parameter.
Monotone cubic interpolation
Main article: Monotone cubic interpolationIf a cubic Hermite spline of any of the above listed types is used for interpolation of a monotonic data set, the interpolated function will not necessarily be monotonic, but monotonicity can be preserved by adjusting the tangents.
Interpolation on the unit interval without exact derivatives
Given p_{1}, p_{0}, p_{1} and p_{2} as the values that the function should take on at 1, 0, 1 and 2, we can use centered differences instead of exact derivatives.^{[2]} Thus the Catmull–Rom spline is
for , where the lefthand vector is independent of the p.
This writing is relevant for tricubic interpolation, where one optimization requires you to compute CINT_{x} sixteen times with the same x and different p.
See also
 Bicubic interpolation, a generalization to two dimensions
 Tricubic interpolation, a generalization to three dimensions
 Hermite interpolation
 Multivariate interpolation
 Spline interpolation
References
 Catmull, Edwin and Rom, Raphael, A class of local interpolating splines, in R.E. Barnhill and R.F. Riesenfe}d (eds.) Computer Aided Geometric Design, Academic Press, New York, 1974, 317326.
External links
 Spline Curves, Prof. Donald H. House Clemson University
 Multidimensional Hermite Interpolation and Approximation, Prof. Chandrajit Bajaja, Purdue University
 Introduction to CatmullRom Splines, MVPs.org
 Interpolating Cardinal and CatmullRom splines
 Interpolation methods: linear, cosine, cubic and hermite (with C sources)
 Common Spline Equations
Categories: Splines
 Interpolation
Wikimedia Foundation. 2010.