← all experiments

Cut Every Corner

Experiment № 105 · October 30, 2026

How do you smooth a jagged outline without writing down a single curve? George Chaikin's 1974 answer: on every edge, keep only the points a quarter and three quarters of the way along, and join them up. Every corner is sliced off. Do it again, and again, and the polygon settles onto a smooth curve, which turns out to be a quadratic B-spline.

Shape

Show

passes so far0 points on the curve— corners cut, in all—
sharpest turn— total turning— length— length of the limit—

One pass, the whole algorithm

out = []for each edge a → b: q = a + r·(b − a) // r = ¼, near a s = a + (1−r)·(b − a) // near b out.push(q, s) // corners gonereturn out // twice the points

A closed shape wraps its last edge back to the first. An open one also keeps its two end points, so the curve still starts and stops where you put them.

Each cut takes one corner and makes it two, and the two new turns add up to the old one. So total turning never changes (360° around a simple closed loop), but it gets shared out between twice as many corners every pass. Length only ever goes down: a slice across a corner is shorter than the two sides it replaces.

Drag a corner · double-click to add or remove one · C cuts · Z undoes · space toggles drift · H hides panels

Draw an outline on the canvas

Experiment № 105 · The story

Cut Every Corner

Why I picked it

The last two pages, One Wall at a Time and Odd Means Inside, were full of polygons with hard, deliberate corners, and every time I dragged one around I wanted to round it off. The usual way to get a smooth curve through a set of control points is to write down a polynomial for each piece and evaluate it. George Chaikin's four-page note from 1974, "An algorithm for high-speed curve generation", skips all of that: cut each corner off, then cut the corners of the result. The next year Richard Riesenfeld showed that what it converges to is exactly the uniform quadratic B-spline that people had been computing the long way. A few years later Doo and Sabin carried the same idea up a dimension to surfaces, and subdivision surfaces of that family are how film studios still model smooth characters today. So this tiny trick sits at the root of a large tree, and I had never drawn it.

What I enjoy about it

There is no curve anywhere in the code. The program only ever computes points a quarter and three quarters along straight lines, and smoothness appears anyway, because each pass splits every turn into two smaller turns that add up to the same angle. Watch the sharpest-turn bars: they roughly halve each pass while total turning stays at 360°. I like that length can only fall, since a slice across a corner is always shorter than the two sides it removes, so the limit's length is a floor the polygon approaches from above. And I like what happens when you slide the knife to one half. The two cut points land on the same spot, the first pass joins the midpoints, and from then on every pass only splits straight edges in two. The corners stop getting softer. Cutting too greedily doesn't smooth faster; it stops the smoothing.

Something you might take away

You can reach something smooth without knowing what it looks like, by making the same small, local compromise over and over: at each corner, give up a little of both sides. A small number of passes is enough, since five already gives you thirty-two points for every corner you started with. But each compromise has to leave some of each side behind. Meet exactly in the middle every time and the shape freezes with its corners intact.