intuition

How random midpoints draw a fractal

2026-05-13

Three corners. A wandering point. The rule: pick a random corner. Move halfway toward it. Drop a dot. Repeat.

Nothing about this should produce a pattern. A coin is being flipped, twice, eight thousand times. There is no plan. There is no symmetry baked into the choosing. And yet the dots don't fill the triangle. They miss most of it on purpose.

dots placed = -
dots cap = -

The point bounces between the top, bottom-left, and bottom-right corners, leaving a trail. After a few hundred dots a hole appears in the middle. After a few thousand, three smaller holes appear inside the three remaining sub-triangles. Then nine. Then twenty-seven. Holes inside holes inside holes - the Sierpinski triangle, named for the Polish mathematician who described it in 1915, drawn here one coin flip at a time. Click anywhere inside the figure to jump the wandering point and watch the rule pull it back into the fractal.

Why the hole has to be empty

Look at the centre hole - the inverted triangle in the middle of the figure. Why does no dot ever land there?

Suppose a dot did land in the centre hole. To get there, the previous dot would have to be more than halfway from every corner toward the centre - because moving halfway toward any corner can only take you out of the centre hole, not into it. The geometry of "halfway toward a corner" makes that impossible. Once the point is outside the centre hole, it stays outside. And it doesn't take many jumps for any starting point to slide outside.

The same argument repeats one scale down: each sub-triangle has its own central hole, and "halfway toward a corner" can't jump into it either. Then one scale down again. Holes inside holes, on every scale. That is what a fractal is.

Why the colours work out

Each dot is coloured by which corner the point just jumped toward. Watch the figure: every dot near the top is blue. Every dot near the bottom-left is red. Every dot near the bottom-right is green. No exceptions.

A new dot is the midpoint of the previous dot and the corner you just chose. So the new dot sits in the half of the triangle that is closer to that corner - the upper third, lower-left third, or lower-right third. The dot can't reach any other sub-triangle without picking that sub-triangle's corner. The colours sort themselves.

Inside each coloured sub-triangle the same thing happens one scale down - the dots there split into three sub-sub-triangles coloured the same way. The figure is its own pattern repeated forever.

An iterated function

Mathematicians have a name for the rule "pick one of three contractions at random and apply it" - it is an iterated function system. Each of the three "halfway-toward-a-corner" maps shrinks the triangle to a half-sized copy at one corner. The attractor of the system - the set of points all the rules together fix in place - is the Sierpinski triangle. The dots wander randomly, but they wander toward the attractor and never leave it.

Change the rule and the fractal changes. Move halfway by a smaller fraction and the holes shrink. Use four corners instead of three and the dots fill a square - no fractal. Use four corners and a jump factor of one-third and the dots form a fractal square. The Sierpinski is what happens when the geometry of the corners and the jump ratio align exactly.

Three corners, halfway each time, no plan at all. Eight thousand coin flips later the dots have drawn something they were never told to draw.