← All animations

✒️ Bézier Curves

A handful of control points and one elegant idea — repeated linear interpolation — produce the smooth curves behind every font glyph, vector illustration and animation ease. The recipe is De Casteljau's algorithm: blend neighbouring points, then blend the blends, and keep going until a single point remains. Sweep that from start to finish and it traces the curve. Drag the dots below and watch the whole construction reshape live.

1. De Casteljau's construction — blending, again and again

Here is a cubic Bézier with four control points — drag any of them. At a parameter t between 0 and 1, walk a fraction t along each leg of the control polygon (first layer), then along the legs joining those points (second layer), and so on. The last layer collapses to a single point — and that point lies exactly on the curve. Move the slider, or press Play, to sweep t and trace it out.

t = 0.350

2. Curve order — how many layers?

The number of control points sets the degree. A linear curve (2 points) is just a straight segment — one interpolation. A quadratic (3 points) adds a second blending layer; a cubic (4 points) adds a third. Each extra point gives the curve another degree of freedom — and one more layer of De Casteljau triangles. Switch the order and drag the points to feel the difference.

Cubic — 3 blending layers

3. Why curves stay tame — the convex hull & tangents

Two guarantees make Bézier curves the workhorse of design. First, the curve never strays outside the convex hull of its control points — the smallest "rubber band" stretched around them. Second, the curve leaves the first point heading straight along the first control leg, and arrives at the last point along the last leg — so the end tangents are exactly the polygon's end edges. That predictability is why fonts, SVG paths and CSS easing curves can all be edited by dragging just a few handles.

Bézier curves: fonts · vector graphics · animation easing