Type of cardinal spline
Catmull–Rom spline is a special case of a cardinal spline . This assumes uniform parameter spacing.
For tangents chosen to be
m
k
=
p
k
+
1
−
p
k
−
1
2
{\displaystyle {\boldsymbol {m}}_{k}={\frac {{\boldsymbol {p}}_{k+1}-{\boldsymbol {p}}_{k-1}}{2}}}
in the definition formula of cubic Hermite spline :
p
(
t
)
=
(
2
t
3
−
3
t
2
+
1
)
p
k
+
(
t
3
−
2
t
2
+
t
)
m
k
+
(
−
2
t
3
+
3
t
2
)
p
k
+
1
+
(
t
3
−
t
2
)
m
k
+
1
{\displaystyle {\boldsymbol {p}}(t)=\left(2t^{3}-3t^{2}+1\right){\boldsymbol {p}}_{k}+\left(t^{3}-2t^{2}+t\right){\boldsymbol {m}}_{k}+\left(-2t^{3}+3t^{2}\right){\boldsymbol {p}}_{k+1}+\left(t^{3}-t^{2}\right){\boldsymbol {m}}_{k+1}}
the following formula for the Catmull–Rom spline is obtained:
p
(
t
)
=
1
2
[
t
3
t
2
t
1
]
[
−
1
3
−
3
1
2
−
5
4
−
1
−
1
0
1
0
0
2
0
0
]
[
p
k
−
1
p
k
p
k
+
1
p
k
+
2
]
{\displaystyle {\boldsymbol {p}}(t)={\frac {1}{2}}{\begin{bmatrix}t^{3}&t^{2}&t&1\end{bmatrix}}{\begin{bmatrix}-1&3&-3&1\\2&-5&4&-1\\-1&0&1&0\\0&2&0&0\end{bmatrix}}{\begin{bmatrix}{\boldsymbol {p}}_{k-1}\\{\boldsymbol {p}}_{k}\\{\boldsymbol {p}}_{k+1}\\{\boldsymbol {p}}_{k+2}\end{bmatrix}}}
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]
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 a common way to create smooth movement between key moments.[ 5] For example, they’re often used to turn a series of camera keyframes into a fluid camera path.[ 6]
Definition (by Catmull and Rom)[ edit ]
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.
[ 7]
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:
F
(
t
)
=
∑
j
p
j
C
j
k
(
t
)
{\displaystyle \mathbf {F} (t)=\sum _{j}^{}{\mathbf {p} }_{j}C_{jk}(t)}
where
p
j
{\displaystyle {\mathbf {p} }_{j}}
are defining points,
C
j
k
(
t
)
{\displaystyle C_{jk}(t)}
are shifted blending functions
C
0
,
k
(
t
)
{\displaystyle C_{0,k}(t)}
into interval
0
≤
t
<
1
{\displaystyle 0\leq t<1}
.
Below are, from left, an example of blending functions
C
0
,
k
(
t
)
{\displaystyle C_{0,k}(t)}
, its shifted
C
j
k
(
t
)
{\displaystyle C_{jk}(t)}
, and a curve
F
(
t
)
{\displaystyle \mathbf {F} (t)}
.
The blending functions are following cardinal functions:
[ note 1]
C
0
,
k
(
t
)
=
∑
i
=
0
k
[
∏
j
=
i
−
k
j
≠
0
i
(
t
j
+
1
)
]
w
(
t
+
i
)
{\displaystyle C_{0,k}(t)=\sum _{i=0}^{k}\left[\prod _{\begin{array}{c}j=i-k\\j\neq 0\end{array}}^{i}\left({\frac {t}{j}}+1\right)\right]w(t+i)}
Linear Lagrange interpolation is used, so
k
=
1
{\displaystyle k=1}
, resulting in:
C
0
,
1
(
t
)
=
(
1
−
t
)
w
(
t
)
+
(
1
+
t
)
w
(
1
+
t
)
{\displaystyle C_{0,1}(t)=(1-t)w(t)+(1+t)w(1+t)}
where
w
(
t
)
{\displaystyle w(t)}
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
C
0
,
1
(
t
)
{\displaystyle C_{0,1}(t)}
are as follows:
Applying this
w
(
t
)
{\displaystyle w(t)}
to
C
0
,
1
(
t
)
{\displaystyle C_{0,1}(t)}
:
C
0
,
1
(
t
)
=
{
1
2
t
3
+
5
2
t
2
+
4
t
+
2
f
o
r
−
2
≤
t
<
−
1
−
3
2
t
3
−
5
2
t
2
+
1
f
o
r
−
1
≤
t
<
0
3
2
t
3
−
5
2
t
2
+
1
f
o
r
0
≤
t
<
1
−
1
2
t
3
+
5
2
t
2
−
4
t
+
2
f
o
r
1
≤
t
<
2
{\displaystyle C_{0,1}(t)=\left\{{\begin{array}{ll}{\frac {1}{2}}t^{3}+{\frac {5}{2}}t^{2}+4t+2&for\quad -2\leq t<-1\\-{\frac {3}{2}}t^{3}-{\frac {5}{2}}t^{2}+1&for\quad -1\leq t<0\\{\frac {3}{2}}t^{3}-{\frac {5}{2}}t^{2}+1&for\quad 0\leq t<1\\-{\frac {1}{2}}t^{3}+{\frac {5}{2}}t^{2}-4t+2&for\quad 1\leq t<2\end{array}}\right.}
are obtained. Shifting these to the interval
0
≤
t
<
1
{\displaystyle 0\leq t<1}
gives
C
j
1
(
t
)
{\displaystyle C_{j1}(t)}
, and arrange them into matrix form gives:
F
(
t
)
=
1
2
[
t
3
t
2
t
1
]
[
−
1
3
−
3
1
2
−
5
4
−
1
−
1
0
1
0
0
2
0
0
]
[
p
j
p
j
+
1
p
j
+
2
p
j
+
3
]
{\displaystyle \mathbf {F} (t)={\frac {1}{2}}{\begin{bmatrix}t^{3}&t^{2}&t&1\end{bmatrix}}{\begin{bmatrix}-1&3&-3&1\\2&-5&4&-1\\-1&0&1&0\\0&2&0&0\end{bmatrix}}{\begin{bmatrix}{\mathbf {p} }_{j}\\{\mathbf {p} }_{j+1}\\{\mathbf {p} }_{j+2}\\{\mathbf {p} }_{j+3}\end{bmatrix}}}
which coincides with the definition by a cubic Hermite spline.
Comparison with B-spline [ edit ]
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.[ 8]
Below are, from left, an example of blending functions, basis functions before shifting, and a curve of cubic uniform B-spline.
A Catmull–Rom spline curve is C1 continuous by its definition and the following, but not C2 continuous:
F
k
′
(
1
)
=
1
2
[
0
−
1
0
1
]
[
p
k
−
1
p
k
p
k
+
1
p
k
+
2
]
=
F
k
+
1
′
(
0
)
=
1
2
[
−
1
0
1
0
]
[
p
k
p
k
+
1
p
k
+
2
p
k
+
3
]
{\displaystyle {\mathbf {F} }_{k}'(1)={\frac {1}{2}}{\begin{bmatrix}0&-1&0&1\end{bmatrix}}{\begin{bmatrix}{\mathbf {p} }_{k-1}\\{\mathbf {p} }_{k}\\{\mathbf {p} }_{k+1}\\{\mathbf {p} }_{k+2}\end{bmatrix}}={\mathbf {F} }_{k+1}'(0)={\frac {1}{2}}{\begin{bmatrix}-1&0&1&0\end{bmatrix}}{\begin{bmatrix}{\mathbf {p} }_{k}\\{\mathbf {p} }_{k+1}\\{\mathbf {p} }_{k+2}\\{\mathbf {p} }_{k+3}\end{bmatrix}}}
F
k
″
(
1
)
=
[
−
1
4
−
5
2
]
[
p
k
−
1
p
k
p
k
+
1
p
k
+
2
]
≠
F
k
+
1
″
(
0
)
=
[
2
−
5
4
−
1
]
[
p
k
p
k
+
1
p
k
+
2
p
k
+
3
]
{\displaystyle {\mathbf {F} }_{k}''(1)={\begin{bmatrix}-1&4&-5&2\end{bmatrix}}{\begin{bmatrix}{\mathbf {p} }_{k-1}\\{\mathbf {p} }_{k}\\{\mathbf {p} }_{k+1}\\{\mathbf {p} }_{k+2}\end{bmatrix}}\neq {\mathbf {F} }_{k+1}''(0)={\begin{bmatrix}2&-5&4&-1\end{bmatrix}}{\begin{bmatrix}{\mathbf {p} }_{k}\\{\mathbf {p} }_{k+1}\\{\mathbf {p} }_{k+2}\\{\mathbf {p} }_{k+3}\end{bmatrix}}}
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:
Converting to Bézier curve[ edit ]
Example of converted Bézier curve (red: control points of Bézier curve)
Since the matrix form of a cubic Bézier curve is:
P
(
t
)
=
[
t
3
t
2
t
1
]
[
−
1
3
−
3
1
3
−
6
3
0
−
3
3
0
0
1
0
0
0
]
[
p
b
z
0
p
b
z
1
p
b
z
2
p
b
z
3
]
{\displaystyle \mathbf {P} (t)={\begin{bmatrix}t^{3}&t^{2}&t&1\end{bmatrix}}{\begin{bmatrix}-1&3&-3&1\\3&-6&3&0\\-3&3&0&0\\1&0&0&0\end{bmatrix}}{\begin{bmatrix}{\mathbf {p_{bz}} }_{0}\\{\mathbf {p_{bz}} }_{1}\\{\mathbf {p_{bz}} }_{2}\\{\mathbf {p_{bz}} }_{3}\end{bmatrix}}}
the control points of a cubic Bézier curve equivalent to the Catmull–Rom spline curve are:
[
p
b
z
0
p
b
z
1
p
b
z
2
p
b
z
3
]
=
[
−
1
3
−
3
1
3
−
6
3
0
−
3
3
0
0
1
0
0
0
]
−
1
1
2
[
−
1
3
−
3
1
2
−
5
4
−
1
−
1
0
1
0
0
2
0
0
]
[
p
k
−
1
p
k
p
k
+
1
p
k
+
2
]
=
1
6
[
0
6
0
0
−
1
6
1
0
0
1
6
−
1
0
0
6
0
]
[
p
k
−
1
p
k
p
k
+
1
p
k
+
2
]
{\displaystyle {\begin{bmatrix}{\mathbf {p_{bz}} }_{0}\\{\mathbf {p_{bz}} }_{1}\\{\mathbf {p_{bz}} }_{2}\\{\mathbf {p_{bz}} }_{3}\end{bmatrix}}={\begin{bmatrix}-1&3&-3&1\\3&-6&3&0\\-3&3&0&0\\1&0&0&0\end{bmatrix}}^{-1}{\frac {1}{2}}{\begin{bmatrix}-1&3&-3&1\\2&-5&4&-1\\-1&0&1&0\\0&2&0&0\end{bmatrix}}{\begin{bmatrix}{\mathbf {p} }_{k-1}\\{\mathbf {p} }_{k}\\{\mathbf {p} }_{k+1}\\{\mathbf {p} }_{k+2}\end{bmatrix}}={\frac {1}{6}}{\begin{bmatrix}0&6&0&0\\-1&6&1&0\\0&1&6&-1\\0&0&6&0\end{bmatrix}}{\begin{bmatrix}\mathbf {p} _{k-1}\\\mathbf {p} _{k}\\\mathbf {p} _{k+1}\\\mathbf {p} _{k+2}\end{bmatrix}}}
By taking the cartesian cross product of two Catmull-Rom splines, one can get a bivariate surface that interpolates a grid of points.[ 9] 。
It is a bicubic patch expressed by the following formula:
F
(
t
,
u
)
=
[
t
3
t
2
t
1
]
M
[
p
11
p
12
p
13
p
14
p
21
p
22
p
23
p
24
p
31
p
32
p
33
p
34
p
41
p
42
p
43
p
44
]
M
T
[
u
3
u
2
u
1
]
{\displaystyle \mathbf {F} (t,u)={\begin{bmatrix}t^{3}&t^{2}&t&1\end{bmatrix}}\mathbf {M} {\begin{bmatrix}{\mathbf {p} }_{11}&{\mathbf {p} }_{12}&{\mathbf {p} }_{13}&{\mathbf {p} }_{14}\\{\mathbf {p} }_{21}&{\mathbf {p} }_{22}&{\mathbf {p} }_{23}&{\mathbf {p} }_{24}\\{\mathbf {p} }_{31}&{\mathbf {p} }_{32}&{\mathbf {p} }_{33}&{\mathbf {p} }_{34}\\{\mathbf {p} }_{41}&{\mathbf {p} }_{42}&{\mathbf {p} }_{43}&{\mathbf {p} }_{44}\end{bmatrix}}\mathbf {M} ^{T}{\begin{bmatrix}u^{3}\\u^{2}\\u\\1\end{bmatrix}}}
where
M
=
1
2
[
−
1
3
−
3
1
2
−
5
4
−
1
−
1
0
1
0
0
2
0
0
]
{\displaystyle \mathbf {M} ={\frac {1}{2}}{\begin{bmatrix}-1&3&-3&1\\2&-5&4&-1\\-1&0&1&0\\0&2&0&0\end{bmatrix}}}
The patch interpolates the middle four points. Adjoinging patches have continuity of the first derivative.
Expansion of tension parameter [ edit ]
An example of visual effect of the tension parameter on interpolated motion between keyframes (white circle: keyframe, blue:
τ
=
0.2
{\displaystyle \tau =0.2}
, green:
τ
=
0.5
{\displaystyle \tau =0.5}
, red:
τ
=
1.0
{\displaystyle \tau =1.0}
)
In some cases, Catmull–Rom spline is:
m
k
=
τ
(
p
k
+
1
−
p
k
−
1
)
{\displaystyle {\boldsymbol {m}}_{k}=\tau ({\boldsymbol {p}}_{k+1}-{\boldsymbol {p}}_{k-1})}
,
where the coefficient of the tangent vector
1
/
2
{\displaystyle 1/2}
is replaced with
τ
{\displaystyle \tau }
.[ 10] 。
In this case, the definition formula is as follows:
p
(
t
)
=
[
t
3
t
2
t
1
]
[
−
τ
2
−
τ
τ
−
2
τ
2
τ
τ
−
3
3
−
2
τ
−
τ
−
τ
0
τ
0
0
1
0
0
]
[
p
k
−
1
p
k
p
k
+
1
p
k
+
2
]
{\displaystyle {\boldsymbol {p}}(t)={\begin{bmatrix}t^{3}&t^{2}&t&1\end{bmatrix}}{\begin{bmatrix}-\tau &2-\tau &\tau -2&\tau \\2\tau &\tau -3&3-2\tau &-\tau \\-\tau &0&\tau &0\\0&1&0&0\end{bmatrix}}{\begin{bmatrix}{\boldsymbol {p}}_{k-1}\\{\boldsymbol {p}}_{k}\\{\boldsymbol {p}}_{k+1}\\{\boldsymbol {p}}_{k+2}\end{bmatrix}}}
The relationship between
τ
{\displaystyle \tau }
and the tension parameter of Kochanek–Bartels spline (denoted as
τ
K
B
{\displaystyle \tau _{KB}}
) is as follows:
[ 11]
τ
=
1
−
τ
K
B
2
{\displaystyle \tau ={\frac {1-\tau _{KB}}{2}}}
Example of converted Bézier curve (
τ
=
1.0
{\displaystyle \tau =1.0}
)
And the control points of the equivalent cubic Bézier curve are as follows:
[
p
b
z
0
p
b
z
1
p
b
z
2
p
b
z
3
]
=
1
3
[
0
3
0
0
−
τ
3
τ
0
0
τ
3
−
τ
0
0
3
0
]
[
p
k
−
1
p
k
p
k
+
1
p
k
+
2
]
{\displaystyle {\begin{bmatrix}{\mathbf {p_{bz}} }_{0}\\{\mathbf {p_{bz}} }_{1}\\{\mathbf {p_{bz}} }_{2}\\{\mathbf {p_{bz}} }_{3}\end{bmatrix}}={\frac {1}{3}}{\begin{bmatrix}0&3&0&0\\-\tau &3&\tau &0\\0&\tau &3&-\tau \\0&0&3&0\end{bmatrix}}{\begin{bmatrix}\mathbf {p} _{k-1}\\\mathbf {p} _{k}\\\mathbf {p} _{k+1}\\\mathbf {p} _{k+2}\end{bmatrix}}}
^
The product notation stands for "
i
−
k
≤
j
≤
i
{\displaystyle i-k\leq j\leq i}
, excluding
0
{\displaystyle 0}
", which is equivalent to:
C
0
,
k
(
t
)
=
∑
i
=
0
k
w
(
t
+
i
)
∏
j
=
i
−
k
i
{
1
f
o
r
j
=
0
t
j
+
1
o
t
h
e
r
w
i
s
e
{\displaystyle C_{0,k}(t)=\sum _{i=0}^{k}w(t+i)\prod _{j=i-k}^{i}\left\{{\begin{array}{ll}1&for\quad j=0\\{\frac {t}{j}}+1&otherwise\end{array}}\right.}
^
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.
^ a b Catmull, Edwin; Rom, Raphael (1974), "A Class of Local Interpolating Splines" , Computer Aided Geometric Design , Elsevier, pp. 317– 326, doi :10.1016/b978-0-12-079050-0.50020-5 , ISBN 978-0-12-079050-0 , retrieved 2026-01-06 {{citation }}: CS1 maint: work parameter with ISBN (link )
^ Catmull, Rom (1974), p.325 Figure 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.
^ Gao, Tianmu; Zou, Danping; Chen, Chao Ping; Wu, Xiaojun; Hu, Haiyang (2025-02-28). "Online lane mapping based on multi-sensor SLAM and Catmull–Rom splines" . Measurement Science and Technology . 36 (2): 026318. doi :10.1088/1361-6501/ada8c8 . ISSN 0957-0233 .
^ Piotrowski, Lisa; Motejat, Michael; Rössl, Christian; Theisel, Holger (2024). "OptFlowCam: A 3D‐Image‐Flow‐Based Metric in Camera Space for Camera Paths in Scenes with Extreme Scale Variations" . Computer Graphics Forum . 43 (2). doi :10.1111/cgf.15056 . ISSN 0167-7055 .
^ Read the Docs - Uniform Catmull–Rom Splines
^ Catmull, Rom (1974), p.319
^ Catmull, Rom (1974), pp.322-323
^ Christopher Twigg (2003). "Catmull–Rom splines" (PDF) . Carnegie Mellon Computer Graphics . Retrieved 2025-06-10 .
^ Kochanek, Doris H. U.; Bartels, Richard H. (1984). "Interpolating splines with local tension, continuity, and bias control" . ACM SIGGRAPH Computer Graphics . 18 (3): 36– 37. doi :10.1145/800031.808575 . ISBN 0-89791-138-5 .
de Boor, Carl (1978). A Practical Guide to Spline . ISBN 0-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, ISBN 0-12-079050-5