![]() | ||
In numerical analysis, a cubic Hermite spline or cubic Hermite interpolator is a spline where each piece is a third-degree polynomial specified in Hermite form: that is, by its values and first derivatives at the end points of the corresponding domain interval.
Contents
- Unit interval 0 1
- Interpolation on an arbitrary interval
- Uniqueness
- Representations
- Interpolating a data set
- Finite difference
- Cardinal spline
- CatmullRom spline
- KochanekBartels spline
- Monotone cubic interpolation
- Interpolation on the unit interval with matched derivatives at endpoints
- References
Cubic Hermite splines are typically used for interpolation of numeric data specified at given argument values
Cubic polynomial splines can be specified in other ways, the Bézier form being the most common. However, these two methods provide the same set of splines, and data can be easily converted between the Bézier and Hermite forms; so the names are often used as if they were synonymous.
Cubic polynomial splines are extensively used in computer graphics and geometric modeling to obtain curves or motion trajectories that pass through specified points of the plane or three-dimensional space. In these applications, each coordinate of the plane or space is separately interpolated by a cubic spline function of a separate parameter t.
Cubic splines can be extended to functions of two or more parameters, in several ways. Bicubic splines (Bicubic interpolation) are often used to interpolate data on a regular rectangular grid, such as pixel values in a digital image or altitude data on a terrain. Bicubic surface patches, defined by three bicubic splines, are an essential tool in computer graphics.
Cubic splines are often called csplines, especially in computer graphics. Hermite splines are named after Charles Hermite.
Unit interval (0, 1)
On the unit interval
where t ∈ [0, 1].
Interpolation on an arbitrary interval
Interpolating
with
Uniqueness
The formulae specified above provide the unique third-degree polynomial path between the two points with the given tangents.
Proof:
Let
So
We know furthermore that:
Putting (1) and (2) together, we deduce that
Representations
We can write the interpolation polynomial as
where
The "expanded" column shows the representation used in the definition above. The "factorized" column shows immediately, that
Using this connection you can express cubic Hermite interpolation in terms of cubic Bézier curves with respect to the four values
Interpolating a data set
A data set,
The choice of tangents is non-unique, and there are several options available.
Finite difference
The simplest choice is the three-point difference, not requiring constant interval lengths,
for internal points
Cardinal spline
A cardinal spline, sometimes called a canonical spline, is obtained 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. Choosing c=1 yields all zero tangents, and choosing 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. This assumes uniform parameter spacing.
The curve is named after Edwin Catmull and Raphael Rom. The principal advantage of this technique is that the points along the original set of points also make up the control points for the spline curve. Two additional points are required on either end of the curve. The default implementation of the Catmull–Rom algorithm can produce loops and self intersections. The chordal and centripetal Catmull–Rom implementations solve this problem, but use a slightly different calculation. 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 key-frames 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
A Kochanek–Bartels spline is a further generalization on how to choose the tangents given the data points
Monotone cubic interpolation
If 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 with matched derivatives at endpoints
Considering a single coordinate of the points
If, in addition, the tangents at the endpoints are defined as the centered differences of the adjacent points,
To evaluate the interpolated f(x) for a real x, first separate x into the integer portion, n, and fractional portion, u
Then the Catmull–Rom spline is
This writing is relevant for tricubic interpolation, where one optimization requires you to compute CINTu sixteen times with the same u and different p.