Cubic Hermite spline

In the mathematical subfield of numerical analysis (also called CSPLINE ) is under a cubic Hermite spline is a spline understood that interpolates between control points. The control points are connected by segments consisting of cubic polynomials, which merge into one another continuously differentiable. This means that a partial curve just stop there, the next one begins and beyond the tangents of the segments match at their boundaries, which results in a smooth transition (without buckling ) from segment to segment. The individual curves are uniquely determined by start and end points, as well as the incoming and outgoing tangent.

Particularly widespread this is to Splinedefinition between each keyframe, which may also be different from each other, spaced in time to interpolate in programs of computer animation. In addition to the cubic splines also exist splines with a higher or lower order. However, lower orders are classified as too inflexible and implement higher orders to be too expensive. In particular, higher order splines tend to " overshoot ", which could interfere with the animator by unwanted processes at work. Add to this the effective way to calculate the tangents and be able to influence, as is the case for example when later treated Kochanek - Bartels spline. Also available is the definition of a segment of this spline in close relationship to the cubic Bezier curve, so that both can be converted into each other. This makes it possible, the algorithms for Bezier curves (eg the de Casteljau algorithm) to use for the calculation and display of cubic Hermitian splines.

  • 2.1 Finite difference
  • 2.2 Catmull - Rom spline
  • 2.3 Cardinal Spline
  • 2.4 Kochanek - Bartels spline 2.4.1 Tension
  • 2.4.2 continuity
  • 2.4.3 bias
  • 2.4.4 Summary to TCB

Definition of a segment

In the unit interval

The unit interval is a segment of the cubic Hermite spline is defined by the following cubic Hermitian curve:

Here, the starting point and the end point is at at. The points can thereby be multidimensional and are linearly independent. and the corresponding tangent lines at the start and end points. It should be noted that the tangent of the end point is in the direction of escape. It is not to be equated with the second central control point of the Bezier curve, because the definition is fundamentally different.

More illustratively can function in matrix notation represent:

Is referred to as Hermitian matrix.

In the interval of values

In general, the function of the interval is extended accordingly, which results from the equation and the tangents to be scaled in the same ratio. Characterized the distance of the interval is added as an additional parameter, which is derived from when the tangents are not already normalized values ​​for the interval. In the case of normalization.

Derivation

Let the points and their associated tangents and given. Similarly, the unknown function is to be a third-degree polynomial, which can be generally described as represent.

At the same time it is assumed that two adjacent segments set to share the start and end point and a smooth transition is made, so they have the same start and end points, and at these points have the same derivation. This results in four conditions can be described as follows:

The aforementioned polynomial can be vividly described in a matrix form:

It follows for and:

For the tangents of the function must be derived once after, thus yielding the following equations:

The four relations obtained can be summarized as follows:

Now the equation by multiplying by the inverse can be solved for.

Inserted into the general cubic equation results in the first -mentioned definition of the cubic Hermitian splines segment.

Representations and kinship

The Hermitian basis functions can be represented in different ways, which allows you to define various properties of the curve segments directly read.

The expanded form can be obtained directly from the derivation and is usually, as here, used to define.

It can be seen directly on the factorization that has at a zero point and the slope is the same. The same applies to for. and on the other hand have a multiplicity of two and have each of a zero at the end and beginning of the domain.

When considering the Bernstein polynomials of the third order, the analogy to the cubic Bezier curve can be seen, the Bernstein polynomials, and are. Accordingly, there is a direct connection between the two equations, from which arise the following relationships,

Is defined when the Bezier curve as follows:

Through this connection, the de Casteljau algorithm can be used to calculate interpolations using cubic Hermitian splines. It is also apparent that, for a cubic Bezier curve, the control points defining the central direction of the tangent at the end points.

Unambiguity

The definition of the segment ensures that the path between two points is unique. By this is meant that there is no second can be found from different polynomial, which has the same shape.

Interpolation

The scheme of segmentally constructed cubic Hermitian splines can be used to define a record with the control points for a curve passing through the checkpoint and their tangents are chosen such that there is a smooth transition between segments. This means that the tangents of adjacent segments are equal in their common point. The so- interpolated curve then consists of piecewise differentiable segments and is even in the field continuously differentiable.

The choice of tangents, however, is not unique, so that different assay methods have been established with varying results.

Finite difference

The simplest method of selection of the tangents ( increase in the one-dimensional case ), is the use of the finite difference. It can be used the tangents for a segment in the unit interval and calculated as follows:

For endpoints ( and ) is either the one-sided difference is used, which effectively corresponds to a doubling of the start and end point. Alternatively, a predecessor and successor is estimated, for which there are different approaches.

Catmull - Rom spline

Summing up the above equation together, multiplied by a factor defined and obtained the Catmull - Rom spline.

From the portion of the equation is seen that the tangent is oriented to the direction of the vector from to. The parameter scales meanwhile this vector, so that the curve segment will continue or sharper. Frequently, this parameter is fixed at, which again results in the output equation.

Named after this curve is Edwin Catmull and Raphael Rom. In computer graphics, this form is often used to interpolate between keyframes ( keyframes ) or to represent graphical objects. They are mainly used because of its simple calculation and satisfy the condition that each key frame is reached exactly, while the movement continues to segment and soft segment without jumps. It should be noted that a total of four curved segments change by the change of a control point on the determination of the adjacent tangents.

Cardinal spline

A cardinal spline is obtained when the tangents are determined as follows:

The parameter is understood as the voltage curve and must lie in the interval. Considered Clearly, the parameter determines the " length of the tangents " where means that they have no length, leads to twice as long tangents, which draws a very soft pass through the checkpoint by itself.

Kochanek - Bartels spline

The Kochanek - Bartels spline (also called TCB - spline) is a further generalization of the choice of the tangents can be influenced by the parameters Tension, Continuity and Bias. They were introduced in 1984 by Doris HU Kochanek, Richard H. Bartels and to provide users with the keyframe animation to give greater control over the course of the interpolation. They became known through applications such as 3ds Max from Discreet or Lightwave 3D from Newtek.

As a basis for Kochanek - Bartels splines of the spline -continuous Hermitian, the left - and right-sided tangents ( and ) is allowed at a checkpoint.

Tension

Tension of the parameters is similar to the parameter of the spline Cardinal and equally influences the length of the tangent at the checkpoint. In analogy to the tangent direction of the Catmull - Rom spline follows:

For negative values, the curve passes through the checkpoint in a wide arc, while it contracts strongly positive. In the case of the tangents have a length of, thereby forming a sharp crease is formed but - continuous. When the tangent is twice as long as for giving a far extending arc through the checkpoint.

Continuity

The continuity parameter can diverge the tangents in their direction. According to the parameter has different effects on the left and right side tangent:

For values ​​of the spline is no longer continuous. The curve shows the corners are sharper with increasing. The sign defines the meantime whether the corner to the "outside " or "inside" shows.

Bias

The bias parameter determines which segment has a stronger influence on the tangent. According rotates the common tangent in the direction of the weight.

Summary of TCB

Summarizing the properties obtained for the tangents together, we obtain the following equations for the incoming and outgoing tangent of:

163752
de