A single
Step 1 — chop the long list into short segments. Given waypoints
Step 2 — make the pieces actually meet:
This is
Step 3 — kill the kink: match the tangents,
Now the pieces leave and arrive along the same tangent line at the same speed: no
kink. This is
Step 4 — match the bend too:
so the curvature (how hard the path is bending) matches across the join too.
This is
Step 5 — but where do the tangents come from? To enforce
Step 6 — the game favourite: Catmull–Rom. The Catmull–Rom spline does
exactly that. It is interpolating — the curve passes through every
control point, not just close to it (unlike a plain Bézier's interior handles, which only
pull the curve). And it sets each waypoint's tangent automatically from its
two neighbours: the tangent at
That single rule — "head in the direction your neighbours suggest" — gives a
Not every spline behaves like Catmull–Rom. Swap in a B-spline and the curve suddenly only approximates its control points — it hugs them, but generally passes near, not through, almost all of them. Ship a B-spline where you meant an interpolating one and your carefully placed camera keyframes or racing-line apexes simply won't be visited; the path drifts past them instead.
The opposite mistake bites too. Catmull–Rom's automatic neighbour-based tangents can overshoot — swing past the "obvious" path — when waypoints are unevenly spaced or the direction changes sharply, producing a visible bulge, or a camera that swings wider than intended before snapping back. There's no universally "best" spline: pick the type for the job — interpolating when every waypoint must be visited exactly, an approximating type (or a tension parameter) when a smoother, overshoot-free hug of the points matters more.
Splines are everywhere a smooth path is needed. A cutscene camera is almost always a Catmull–Rom (or Bézier) spline through a handful of placed keyframes: the designer drops cameras at interesting spots and the spline glides between them.
A racing AI's ideal line is a spline threaded through apexes the designer
(or an optimiser) marks around the track — here
And procedural roads and rivers in open worlds are splines through scattered control nodes: the spline defines the centre-line, then a mesh is extruded along it. Same maths, three industries — drop points, demand the right continuity, glide.
Five waypoints, one continuous Catmull–Rom curve through all of them. Each interior
point's tangent (the faint arrow) is computed from its neighbours by