Top Qs
Timeline
Chat
Perspective

Catmull–Rom spline

From Wikipedia, the free encyclopedia

Catmull–Rom spline
Remove ads

Catmull–Rom spline is a special case of a cardinal spline. This assumes uniform parameter spacing. For tangents chosen to be

in the definition formula of cubic Hermite spline:

the following formula for the Catmull–Rom spline is obtained:

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.[1]

Thumb
Example of Catmull–Rom spline[2]

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[3] solve this problem, but use a slightly different calculation.[4] 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.

Remove ads

Definition (by Catmull and Rom)

Summarize
Perspective

Referenced paper[1] is for a class of splines passing through their defining points. Graphs and experimental results for the following blending functions are shown, with "case 3" being a Catmull–Rom spline curve. [5]

More information Interval Width, Differentiability ...

The model of the spline is:

where are defining points, are shifted blending functions into interval .

Below are, from left, an example of blending functions , its shifted , and a curve .

Thumb

The blending functions are following cardinal functions: [note 1]

Linear Lagrange interpolation is used, so , resulting in:

where is a blending function obtained by shifting the basis functions of a quadratic uniform B-spline.

Below are, from the left, blending functions of a quadratic uniform B-spline and the basis functions before shifting.

Thumb

The graphs of each term in are as follows:

Thumb

Applying this to :

are obtained. Shifting these to the interval gives , and arrange them into matrix form gives:

which coincides with the definition by a cubic Hermite spline.

Remove ads

Properties

Summarize
Perspective

Comparison with B-spline

A Catmull–Rom spline curve is interpolation that passes through its defining points, whereas a B-spline curve is approximation that do not pass through its control points.[6]

Below are, from left, an example of blending functions, basis functions before shifting, and a curve of cubic uniform B-spline.

Thumb

Continuity

A Catmull–Rom spline curve is C1 continuous by its definition and the following, but not C2 continuous:

Self-intersection

If the difference in the intervals between the defining points is large in the middle of a curve, cusps or self-intersections may occur. [note 2]

Below is an example of a self-intersection:

Thumb

Converting to Bézier curve

Thumb
Example of converted Bézier curve (red: control points of Bézier curve)

Since the matrix form of a cubic Bézier curve is:

the control points of a cubic Bézier curve equivalent to the Catmull–Rom spline curve are:

Remove ads

Extension to Surfaces (bicubic interpolation)

Summarize
Perspective

By taking the cartesian cross product of two Catmull-Rom splines, one can get a bivariate surface that interpolates a grid of points.[7]

It is a bicubic patch expressed by the following formula:

where

The patch interpolates the middle four points. Adjoinging patches have continuity of the first derivative.

Remove ads

Expansion of tension parameter

Summarize
Perspective
Thumb
An example of visual effect of the tension parameter on interpolated motion between keyframes (white circle: keyframe, blue: , green: , red: )

In some cases, Catmull–Rom spline is:

,

where the coefficient of the tangent vector is replaced with .[8]

In this case, the definition formula is as follows:

The relationship between and the tension parameter of Kochanek–Bartels spline (denoted as ) is as follows: [9]

Thumb
Example of converted Bézier curve ()

And the control points of the equivalent cubic Bézier curve are as follows:

Remove ads

See also

Notes

  1. The product notation stands for ", excluding ", which is equivalent to:
  2. It is safe for the first or last definition point to overlap with an adjacent definition point. This is sometimes used intentionally as a technique to hide "extra" definition points, and the example at the top was created in this way.
Remove ads

References

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads