Cubic Hermite Spline

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.

Cubic Hermite splines are typically used for interpolation of numeric data specified at given argument values , to obtain a continuous function. The data should consist of the desired function value and derivative at each . (If only the values are provided, the derivatives must be estimated from them.) The Hermite formula is applied to each interval separately. The resulting spline will be continuous and will have continuous first derivative.

Cubic polynomial splines can be specified in other ways, the Bezier cubic 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 polynomial splines are also used extensively in structural analysis applications, such as Euler–Bernoulli beam theory. Cubic polynomial splines have also been applied to mortality analysis and mortality forecasting.

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.

Interpolation on a single interval

Unit interval [0, 1]

Cubic Hermite Spline 
The four Hermite basis functions. The interpolant in each subinterval is a linear combination of these four functions.

On the unit interval Cubic Hermite Spline , given a starting point Cubic Hermite Spline  at Cubic Hermite Spline  and an ending point Cubic Hermite Spline  at Cubic Hermite Spline  with starting tangent Cubic Hermite Spline  at Cubic Hermite Spline  and ending tangent Cubic Hermite Spline  at Cubic Hermite Spline , the polynomial can be defined by

Cubic Hermite Spline 
where t ∈ [0, 1].

Interpolation on an arbitrary interval

Interpolating Cubic Hermite Spline  in an arbitrary interval Cubic Hermite Spline  is done by mapping the latter to Cubic Hermite Spline  through an affine (degree-1) change of variable. The formula is

Cubic Hermite Spline 
where Cubic Hermite Spline , and Cubic Hermite Spline  refers to the basis functions, defined below. Note that the tangent values have been scaled by Cubic Hermite Spline  compared to the equation on the unit interval.

Uniqueness

The formula specified above provides the unique third-degree polynomial path between the two points with the given tangents.

Proof. Let Cubic Hermite Spline  be two third-degree polynomials satisfying the given boundary conditions. Define Cubic Hermite Spline  then:

    Cubic Hermite Spline 
    Cubic Hermite Spline 

Since both Cubic Hermite Spline  and Cubic Hermite Spline  are third-degree polynomials, Cubic Hermite Spline  is at most a third-degree polynomial. So Cubic Hermite Spline  must be of the form

Cubic Hermite Spline 
Calculating the derivative gives
Cubic Hermite Spline 

We know furthermore that

    Cubic Hermite Spline 
    Cubic Hermite Spline 

    ()
    Cubic Hermite Spline 
    Cubic Hermite Spline 

    ()

Putting (1) and (2) together, we deduce that Cubic Hermite Spline , and therefore Cubic Hermite Spline  thus Cubic Hermite Spline 

Representations

We can write the interpolation polynomial as

Cubic Hermite Spline 
where Cubic Hermite Spline , Cubic Hermite Spline , Cubic Hermite Spline , Cubic Hermite Spline  are Hermite basis functions. These can be written in different ways, each way revealing different properties:
expanded factorized Bernstein
Cubic Hermite Spline  Cubic Hermite Spline  Cubic Hermite Spline  Cubic Hermite Spline 
Cubic Hermite Spline  Cubic Hermite Spline  Cubic Hermite Spline  Cubic Hermite Spline 
Cubic Hermite Spline  Cubic Hermite Spline  Cubic Hermite Spline  Cubic Hermite Spline 
Cubic Hermite Spline  Cubic Hermite Spline  Cubic Hermite Spline  Cubic Hermite Spline 

The "expanded" column shows the representation used in the definition above. The "factorized" column shows immediately that Cubic Hermite Spline  and Cubic Hermite Spline  are zero at the boundaries. You can further conclude that Cubic Hermite Spline  and Cubic Hermite Spline  have a zero of multiplicity 2 at 0, and Cubic Hermite Spline  and Cubic Hermite Spline  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:

Cubic Hermite Spline 

Using this connection you can express cubic Hermite interpolation in terms of cubic Bézier curves with respect to the four values Cubic Hermite Spline  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.

We can also write the polynomial in standard form as

Cubic Hermite Spline 
where the control points and tangents are coefficients. This permits efficient evaluation of the polynomial at various values of t since the constant coefficients can be computed once and reused.

Interpolating a data set

A data set, Cubic Hermite Spline  for Cubic Hermite Spline , 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 Cubic Hermite Spline .

The choice of tangents is not unique, and there are several options available.

Finite difference

Cubic Hermite Spline 
Example with finite-difference tangents

The simplest choice is the three-point difference, not requiring constant interval lengths:

    Cubic Hermite Spline 

for internal points Cubic Hermite Spline , and one-sided difference at the endpoints of the data set.

Cardinal spline

Cubic Hermite Spline 
Cardinal spline example in 2D. The line represents the curve, and the squares represent the control points Cubic Hermite Spline . Notice that the curve does not reach the first and last points; these points do, however, affect the shape of the curve. The tension parameter used is 0.1

A cardinal spline, sometimes called a canonical spline, is obtained if

    Cubic Hermite Spline 

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 in the uniform parameterization case.

Catmull–Rom spline

Cubic Hermite Spline 
Geometric interpretation of Catmull–Rom cubic interpolation of the black point with uniformly spaced abscissae.

For tangents chosen to be

    Cubic Hermite Spline 

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 uniform Catmull–Rom implementation 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 Cubic Hermite Spline , Cubic Hermite Spline  and Cubic Hermite Spline , with three parameters possible: tension, bias and a continuity parameter.

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

Consider a single coordinate of the points Cubic Hermite Spline  and Cubic Hermite Spline  as the values that a function f(x) takes at integer ordinates x = n − 1, n, n + 1 and n + 2,

    Cubic Hermite Spline 

In addition, assume that the tangents at the endpoints are defined as the centered differences of the adjacent points:

Cubic Hermite Spline 

To evaluate the interpolated f(x) for a real x, first separate x into the integer portion n and fractional portion u:

    Cubic Hermite Spline 
    Cubic Hermite Spline 
    Cubic Hermite Spline 
    Cubic Hermite Spline 

where Cubic Hermite Spline  denotes the floor function, which returns the largest integer no larger than x.

Then the Catmull–Rom spline is

Cubic Hermite Spline 
where Cubic Hermite Spline  denotes the matrix transpose. The bottom equality is depicting the application of Horner's method.

This writing is relevant for tricubic interpolation, where one optimization requires computing CINTu sixteen times with the same u and different p.

See also

References

Tags:

Cubic Hermite Spline Interpolation on a single intervalCubic Hermite Spline Interpolating a data setCubic Hermite Spline Interpolation on the unit interval with matched derivatives at endpointsCubic Hermite SplineDerivative (mathematics)Domain of a functionHermite interpolationNumerical analysisPolynomialSpline (mathematics)

🔥 Trending searches on Wiki English:

Solar eclipse of April 8, 2024Jimmy CarterPortugal national football teamBharatiya Janata PartyJadeveon ClowneyDavid DastmalchianThe Voice (American season 25)2016 United States presidential electionEngland national football teamDragon's Dogma 2Mumbai IndiansInna Lillahi wa inna ilayhi raji'unAriana GrandeGoogle TranslateCable (character)Carlos Sainz Jr.List of solar eclipses visible from the United StatesRohit SharmaCape VerdeRichard NixonArnold SchwarzeneggerFlorence PughShohei OhtaniLiu CixinDrake BellLara LoganAlan RitchsonSame-sex marriageBruce SpringsteenOlivier GiroudJohn F. KennedyFrancis Scott KeyRed yeast riceFuture (rapper)NorovirusMrBeastShameless (American TV series)SnapchatBlack swan theoryBradley CooperConstellation (TV series)Ricky StanickyNicole ShanahanEndrick (footballer, born 2006)The Amanda ShowInvincible (TV series)BeyoncéIslamic StateJean-Michel BasquiatGiancarlo EspositoWinston ChurchillInterstate 695 (Maryland)NetEaseHenry CavillJohnny DeppLara TrumpEnglish languageMonsterVerseToyotomi HideyoshiZionismDwayne JohnsonAkira ToriyamaDeath's EndSpainKangana RanautSwitzerlandSunrisers HyderabadList of states and territories of the United StatesForced perspectiveHaitiWorld War ITupac ShakurJasmin ParisSkibidi ToiletHunter SchaferThe Menu (2022 film)Willie Nelson🡆 More