Catmull-Rom Splines
Click to place control points. The Catmull-Rom spline passes smoothly through every point — unlike Bézier curves, which only approximate their control polygon. Drag points to reshape the curve. Toggle tangent vectors and the control polygon to see how the math works.
p(t) = 0.5 · [(2P₁) + (−P₀+P₂)t + (2P₀−5P₁+4P₂−P₃)t² + (−P₀+3P₁−3P₂+P₃)t³]
What is a Catmull-Rom spline?
A Catmull-Rom spline is a type of cubic Hermite spline that automatically computes tangent vectors from neighboring control points. Given four consecutive points P₀, P₁, P₂, P₃, the curve interpolates between P₁ and P₂ using the outer points to determine the direction. The key property: the curve passes through every control point, not just near them.
The tension parameter
The tension parameter τ controls how tightly the curve bends at each control point. At τ = 0.5 (the default), you get the standard Catmull-Rom spline where the tangent at each point is proportional to the vector from the previous to the next point. At τ = 0, the curve becomes linear between points. At τ = 1, it overshoots dramatically.
Catmull-Rom vs. Bézier
Bézier curves use control points as a “control polygon” that the curve approximates but generally does not pass through (except at endpoints). This makes Bézier curves great for manual design (fonts, paths) where you want predictable handles. Catmull-Rom splines are interpolating — the curve hits every point — making them ideal for animation paths, camera tracks, and any situation where you know exactly what points the curve should pass through.
The matrix form
The Catmull-Rom spline can be expressed as a matrix multiplication: p(t) = [1, t, t², t³] · M · [P₀, P₁, P₂, P₃]T where M is the Catmull-Rom basis matrix. Each row of M defines one of the four basis functions that blend the control points.
Applications
Catmull-Rom splines are used extensively in computer graphics for camera paths in film, character animation (interpolating keyframes), procedural road and river generation in games, and data visualization where a smooth curve must pass through measured data points. Edwin Catmull and Raphael Rom introduced the formulation in 1974.