Back to HackerTubeYouTubeNovember 14, 2026Duration:1:13:50

The Continuity of Splines: What Actually Makes a Path Smooth

The Continuity of Splines

FHFreya Holmér

Full transcript

English
Watch on YouTube
Contents

A year-long answer to an innocent question

Source 00:00

"How do you define a smooth path?" sounds like a warm-up question. Freya Holmér treated it as a research program: a year inside math papers, pages of notes, and — she says — the discovery of errors in numerous online resources along the way, followed by burnout before the finish line. This article follows her video's teaching order and keeps its stated limits: the main focus is uniform cubic splines, with linear and non-uniform examples.

The motivation is everywhere once you look. Games define paths for conveyor belts in Satisfactory and for rollercoasters that carry not only position but rotation. Almost all character animation stores a path for every joint. Your browser keeps a path for every letter you are reading. Art tools expose the gradient map, which she re-casts as a path whose input is luminosity instead of time and whose output is a color. Different substances, one structure: all of them are splines.

What varies between splines is not the wigglyness of the resulting line. It is how connected the pieces are where they meet — and that is precisely what the word continuity will measure.

Bézier curves are nested lerps

Source 03:24

The atomic operation is lerp (linear interpolation): blend two points with a t-value from 0 to 1, where 0 returns the first point and 1 the second. Add a third point, lerp along both lines, then lerp between those two results — as t slides from 0 to 1, the final point traces a smooth curve. That is the quadratic Bézier curve, obtained with nothing but lerps. One more point and one more nesting level gives the cubic Bézier, the most common curve in graphics: nearly every font and vector tool is built on it.

View full image

The recursive recipe is De Casteljau's algorithm, which she memorably summarizes as "lerp until you run out of things to lerp". It is numerically stable, though sometimes costly to evaluate.

The same cubic has four equivalent forms

Source 05:11

Writing the lerps out as one formula and shuffling terms produces three more views of the identical cubic:

  • Bernstein form — each control point gets its own cubic polynomial weight. The weights are influences: the first point starts with all of it, the last point ends with all of it, and for t in [0, 1], the weights are nonnegative and sum to 1, so this is a convex combination.
  • Powers of t — rearranged as a constant plus terms in t, t², t³. The coefficients can be cached per arrangement of control points, which makes this the computationally efficient form.
  • Characteristic matrix — her favorite. It isolates every magic number into one matrix, exposes symmetries, and encapsulates the other two: multiplying the powers-of-t row by it yields the Bernstein polynomials; multiplying it by the point column yields the polynomial coefficients.
View full image

Same curve, different geometry in your head, different performance in your code. The matrix form will matter later: derivatives of powers of t are trivial, and the matrix is each spline's "fingerprint".

Bigger Béziers are not the answer

Source 08:39

Béziers generalize to any number of points (she jokingly calls one shown a "dodecic" Bézier). For long paths this fails three ways at once. Every point's influence spans the entire curve, so moving one point reshapes everything — there is no local control, which is fatal when you want a road snaking precisely around mountains. The curve also passes through almost none of its points, and with that many control points evaluation becomes numerically unstable or expensive.

The fix is not a bigger Bézier. It is many ordinary cubics, joined.

The Bézier spline restores local control

Source 13:00

Chain cubic Béziers end to end, sharing endpoints, and you get the Bézier spline. The per-segment input t no longer covers the whole path, so a u-value is introduced for the whole spline: the integer part selects the segment, the fraction is that segment's local t. The vocabulary introduced here recurs for every later spline: the inputs are control points, each segment is a curve, curves meet at joins (or knots), and each curve owns an interval in one-dimensional parameter space delimited by knot values; equal intervals make the spline uniform — the main focus of this video.

View full image

Local control is back: mapping the basis functions into parameter space shows each point's influence confined to one or two adjacent segments. Cost per segment is constant no matter how long the path, and the spline now passes through every third point, which makes shapes far easier to author. All of this flexibility concentrates in the two points flanking each join — the tangent points — which support three configurations: split (broken) for sharp corners, aligned so both curves leave the join in the same direction, and mirrored, which is aligned plus equal distances.

View full image

But animate a box along an aligned-tangent spline and something is off: the box visibly changes speed at every join. Naming and fixing that is where continuity begins.

C1 is cheap; sequential C2 constraints make handles cascade

Source 19:42

Continuity measures how connected curves are. If they merely meet, the path is C0 continuous — position never jumps. Her test footage makes the defect of aligned joins visible: boxes make little "jumps" in speed. The derivative lens explains why. Differentiating the powers-of-t matrix gives the first derivative — velocity — and its graph is disconnected at every aligned join. Mirror the tangent points and the velocity graph connects: the path is now C1 continuous (position and velocity both continuous). Algebra confirms the geometric rule: mirroring forces P4 to equal P2 reflected around P3. That removes independent control over one control point — P4 becomes fully determined — a price she is happy to pay.

View full image

Acceleration is next. For C2 continuity the acceleration at the end of curve A must equal that at the start of curve B. Solvable — but the constraint fully determines P5 from P1, P2 and P3, and applying it at every join cascades: P5 then determines P7, P4–P6 determine P8, P7–P9 determine P11. Almost nothing remains free.

View full image

Move a single point "even just a tiny bit" at this point, and the spline violently throws itself across the screen — spectacular, and useless. Her verdict, worth quoting precisely: "You can't make a cubic Bézier C² continuous — it is literally impossible, without losing local control. And having that control is the whole point of using splines in the first place." This describes the sequential handle constraints she demonstrates, not every way to represent a C2 piecewise cubic: a B-spline can also be expressed as joined cubic Bézier segments.

View full image

Push to C3 (the third derivative, jolt, must match) and the constraints consume the spline entirely: it becomes equivalent to extrapolating the first curve forever. One curve, no joins — trivially C∞. The formal definition collects all of this: functions A and B are Cⁿ continuous when their 0th through nth derivatives all match at the join. Since every non-join point comes from a single polynomial, only joins can ever break continuity. This is parametric continuity, and it is the primary reason to compare spline types at all.

Geometric continuity: shape over speed

Source 26:31

Aligned tangents clearly preserve something — for vector graphics you do not care about speed, only shape. Normalize the velocity to unit length and the speed jump vanishes: direction is continuous. That is G1, tangent continuity — the geometric counterpart of C1.

The stakes are concrete. G2 matters in industrial design — car bodies, phones, "and perhaps, a little sneakily, the shape of the Apple app icon". On a perfectly reflective 3D surface with tangents perfectly aligned, a seam in the reflection is still visible; a dotted background makes the discontinuity unmistakable. The same failure appears somewhere unexpected: joining perfect circular arcs to flat segments. Circles change their tangent angle at a constant rate and lines at zero rate, so where they meet, the angle change stops and restarts abruptly — G1, but no better.

View full image

Analyzing shape independently of speed requires curvature. At a regular point with nonzero curvature there is a best-fitting circle — the osculating circle — whose radius is 1/|κ|. The plane curve’s signed curvature κ is the determinant of velocity and acceleration divided by speed cubed; it changes sign with the bending direction. At zero curvature there is no finite osculating-circle radius (the determinant is the "2D cross product", more precisely a wedge product returning a bivector, she notes, "but that's a topic for another day").

View full image

The standard inspection tool is the curvature comb: normals scaled by curvature, looking like a rigid mohawk along the curve. Combs make G-continuity checkable by eye. G1 requires P4 to lie along the P2→P3 direction from P3, scaled by any positive β1 — one free parameter (β1 = 1 recovers mirroring), but the comb still kinks at the join. The G2 derivation additionally constrains P5 and yields a second degree of freedom β2; when applied, the comb lines up and stays aligned even as control points move. Holmér notes that surfaces with G2 or better are sometimes called Class-A surfaces, a broader design term involving appearance quality; G2 alone does not define Class A. Beyond G2, G3 — continuous rate of change of curvature — is where returns diminish sharply. She also offers the formal definition: A and B are Gⁿ continuous if a sufficiently smooth, orientation-preserving regular reparameterization g(t), with g′(t) > 0, makes A(t) and B(g(t)) Cⁿ continuous — geometric continuity is parametric continuity with control over speed.

View full image

The continuity map and its fine print

Source 36:18

The full map, as she draws it: C0 and G0 are positional. C1 is velocity continuity, G1 tangent; C2 acceleration, G2 curvature; C3 jolt, G3 rate of change of curvature — whose common name "torsion continuity" she argues is simply wrong. Each level includes all previous ones, and every Cⁿ implies its Gⁿ (mirrored tangents are aligned too) — G is strictly more permissive than C, with one caveat.

View full image

The implication only holds for regular curves — velocity never zero. If a point has zero speed, tangent direction and curvature both divide by zero. That pathological case is constructible: place a Bézier's tangent points symmetrically so the curve momentarily stops, and the tangent instantaneously flips. This cusp is C∞ yet only G0 at that point — the rare exception that keeps "C implies G" honest.

Hermite splines: velocities instead of tangent points

Source 40:14

Bézier tangent points "don't really refer to anything specific". The Hermite spline replaces them with physical boundary conditions: start and end positions P0, P1 plus start and end velocities v0, v1 — four equations, solved by a cubic polynomial, and neatly expressible in the characteristic-matrix form. It is interpolating (passes through each point and satisfies its specified velocity), C1 when adjacent segments share the join velocity; acceleration may still jump at joins, although it can match in particular configurations; many implementations allow separate incoming and outgoing velocities per join, making deliberate C0 breaks possible. Use cases: physics simulation and interpolating movement across a network.

View full image

Conversion to Bézier is worth remembering: for a unit parameter interval, positions P0 and P1, and forward endpoint derivatives v0 and v1, the handles are P0 + v0/3 and P1 − v1/3. At a shared C1 join, the outgoing handle is the reflection of the incoming handle across the join.

From linear to Catmull-Rom: smoothness without manual derivatives

Source 44:32

The linear spline — straight lines between points, rarely even called a spline — has three superpowers: it passes through every control point; it is one of the few splines for which arc-length parameterization (constant-speed traversal) is easy, which is "actually very complicated for almost all splines"; and it is cheapest to evaluate, being just a lerp. Its ceiling is C0.

Can a smoother spline interpolate every point without manual derivatives? Estimate each velocity from its neighbors — and mirror a "ghost point" past each end to cover the endpoints. The naive result is lumpy: sharp turns beside flat sections, plainly visible in the curvature comb. Scaling all velocities by a parameter tames it — the cardinal spline. Here she reports a documentation mess: online sources disagree on how to apply the so-called "tension" parameter (she found three different methods), so she renames it scale, "the most computationally efficient way to define it". At scale exactly ½, the curve is unusually comfortable — no superflat runs, no unjustified corners.

View full image

That is the Catmull-Rom spline: G1 and C1 (its second derivative can be discontinuous), passing through every point (endpoints excepted, needing special handling), no tangents to specify — one of the most popular smoothing splines in game development. Its basis functions reward a look: each control point owns a wave describing its influence across four segments, pulling with positive influence (white) and pushing with negative influence (red), peaking at 100% exactly at its own point — which is why the curve interpolates. Reading continuity directly off the basis curves confirms: continuous value, continuous first derivative, broken second.

The B-spline: C2 with local control, at a price

Source 51:57

Still stuck in "C1 land", she tries to force the issue: "the best way to test this is to try doing it yourself". The fingerprint of a cubic spline is its characteristic matrix — 16 unknowns. The constraints: C2 joins between consecutive basis functions (3 equations each, at three boundaries), C2 meetings with the x-axis at both ends, and — the last one — basis functions must sum to 1, because they act as a convex combination. Sixteen equations, sixteen unknowns, solvable.

View full image

The result is the B-spline (Basis Spline). Its basis functions are strikingly smooth. Its curves and joins do not generally pass through the control points; interpolation is deliberately sacrificed. In its own control-point parameterization, the uniform cubic B-spline guarantees C2 while retaining local control; it is also G2 wherever the curve is regular. In contrast, the demonstrated sequential Bézier-handle constraints cascade. The same B-spline can be represented as joined cubic Bézier segments. Velocity and acceleration pass continuously through the joins; C3 is not guaranteed, and jolt jumps in her illustrated example.

View full image

This is why the B-spline rules industrial design, and why acceleration-sensitive animations — camera movement above all, where instantaneous acceleration changes "look pretty jarring" — belong on it.

Splines are curve generators, not curves

Source 58:09

Then the quiz: what spline is this segment? A Bézier — you can "practically see the control points"? A Hermite, with its velocities? A Catmull-Rom, passing through the points? A B-spline, "look how smooth"? All wrong — and also all right. It could equally be a projectile trajectory with a starting point, initial velocity, initial gravity and a change of gravity, traversed in one second; trajectories have their own characteristic matrix.

View full image

The trick answer is the conceptual payoff: the Bézier, Hermite, Catmull–Rom and B-spline segment representations discussed can generate the same cubic curve segment with suitable inputs. So curves are not splines — curves are what splines emit. A spline is a transformation of control points that makes promises: how smoothly curves will connect at joins, and how it will treat your input. Swap the spline, keep the points, get a different curve. "It's about the journey, not the destination" — except, she concedes, it is still a little about the destination too.

View full image

Which spline to use when

Source 59:05

The practical selection guide, with her concrete examples:

  • Bézier spline — maximum control, including intentional tangent breaks: sharp corners for shapes, fonts and vector graphics (her example is a heart).
  • Hermite spline — explicit derivatives make it the animation spline; it is the basis of Unity's animation curve editor. Her demo drives a jumping square's height with a non-uniform 1D Hermite, plus separate splines for its flip angle and squash-and-stretch scale.
  • Catmull-Rom — "just" smooth a set of points, automatically computed velocities, when passing through the points matters (path smoothing).
  • B-spline — curvature-sensitive reflective surfaces, and acceleration-sensitive animation like cameras.
  • Linear — when dense sampling makes smoothness moot; the curves in the video itself are drawn by densely sampling and connecting lines.
View full image

Beyond uniform cubics: NURBS and what was left out

Source 61:30

The main focus above is uniform cubic splines, alongside linear and non-uniform examples. Each family has higher-degree counterparts and non-uniform variants that control timing: non-uniform Hermite lets you decide when a point is reached (that is what animated the jumping square); non-uniform Catmull-Rom sets knot intervals from point distances; the non-uniform B-spline rebuilds each curve's basis from its knot values. For a cubic B-spline, simple interior knots retain C2 continuity; repeated interior knots reduce the guarantee. More generally, an interior knot of multiplicity m in a degree-p B-spline is generally C^(p−m). Adding per-point weights — pulling curves toward or away from specific points — yields the non-uniform rational B-spline: NURBS. Its mechanics are named but not detailed here, because the video does not explore non-uniform splines in depth. The closing bookend loops back to the opening: every color key in a gradient is a control point of a linear spline in the RGB cube, and a gradient map samples that spline by pixel brightness — splines, again, in a place nobody calls them splines.

View full image

What a year of work left on the cutting-room floor, in her own post-credit accounting: natural splines, polar blossoming, the De Boor construction, A-frame construction, knot insertion, degree elevation, knot multiplicity, the β-spline, Kochanek-Bartels, spiro splines, biarcs, and Lagrange interpolation — "which is not even a spline". She also tried to end by inventing a new spline: interpolating like Catmull-Rom but C2, at quartic degree. It works mathematically but looks nearly linear with abrupt quick curves, and only the uniform variant was ever solved — so it was cut. The scope itself was the lesson: the video took a little over a year, she burnt out for several months midway, and her stated plan afterward is smaller topics, chunked in advance.