p → (p + random corner) / 2Take a triangle and a point inside it. Pick one of the three corners at random and jump halfway there. Mark the spot. Repeat.
You might expect the dots to fill the triangle. They don't. After 100,000 jumps they draw the Sierpiński triangle: a triangle with its middle cut out, and the middle cut out of each of the three triangles left, and so on forever.
Why the holes stay empty
Each jump halves the distance to the corner, so it shrinks the whole triangle to a half-size copy next to that corner. Three corners give three half-size copies, and together they leave the middle empty. The Sierpiński triangle is exactly the shape made of three half-size copies of itself, so jumps keep landing on it.
The start doesn't matter. Every jump also halves the point's distance from the fractal, so after 10 jumps it is 1,024 times closer, less than a pixel away. The video draws those first 10 jumps slowly, then lets the rest land at once.
The colours
Each dot is coloured by the corner it just jumped towards. A jump towards a corner always lands in the copy next to that corner, so the three colours split the picture into its three half-size copies.
The method is called the chaos game, a name from the mathematician Michael Barnsley. Different rules (more corners, other fractions of the way) give other fractals.
Part of Chaos game (2 videos): Jump part of the way to a random corner, again and again. A fractal appears from noise.
Use this picture
Free to reuse, also commercially, under CC BY 4.0. Credit “What Math Means” with a link to whatmathmeans.dev/v/random-corner-jump-halfway.







