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]
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.
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]
Interval Width
Differentiability
Type
Degree of Polynomial for Cardinal Function
case 1
3
1
B-SPLINE
case 2
4
2
BEZIER
case 3
4
1
B-SPLINE
1
case 4
6
2
B-SPLINE
2
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 .
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.
The graphs of each term in are as follows:
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.
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.
^
The product notation stands for ", excluding ", which is equivalent to:
^
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.
^ abCatmull, Edwin; Rom, Raphael (1974), "A class of local interpolating splines", in Barnhill, R. E.; Riesenfeld, R. F. (eds.), Computer Aided Geometric Design, New York: Academic Press, pp. 317–326, ISBN0-12-079050-5
^N. Dyn, M. S. Floater, and K. Hormann. Four-point curve subdivision based on iterated chordal and centripetal parameterizations. Computer Aided Geometric Design, 26(3):279–286, 2009.
^P. J. Barry and R. N. Goldman. A recursive evaluation algorithm for a class of Catmull-Rom splines. SIGGRAPH Computer Graphics, 22(4):199–204, 1988.
de Boor, Carl (1978). A Practical Guide to Spline. ISBN0-387-90356-9.
Gordon, William J.; Riesenfeld, Richard F. (1974), "B-spline curves and surfaces", in Barnhill, Robert E.; Riesenfeld, Richard F. (eds.), Computer Aided Geometric Design - Proceedings of a Conference Held at The University of Utah, Salt Lake City, Utah, March 18-21, 1974, New York: Academic Press, pp. 95–126, ISBN0-12-079050-5