Mathematisches
Fractals from bits. Feed a number sequence, watch geometry emerge.
Non-negative integers
The classic Thue-Morse walk. Every integer from 0 to your limit is checked for binary parity. At 65,536 steps this traces the complete Koch snowflake — a fractal with infinite perimeter but finite area, emergent from nothing but bit counting.
Pick a number
Every integer has a binary representation — a string of 1s and 0s. Count how many 1-bits it contains.
Check the parity
Even count of 1s → command F (forward). Odd count → command T (turn left 60°).
Walk the turtle
A virtual turtle reads each command. F means walk one step. T means pivot 60° left. Every number leaves a mark.
Fractal emerges
At 65,536 steps, the complete Koch snowflake appears — infinite complexity from a single arithmetic rule.
Helge von Koch
In 1904, Swedish mathematician Helge von Koch introduced what we now call the Koch curve — one of the earliest known fractals. His goal was purely theoretical: construct a curve that is continuous everywhere but differentiable nowhere. A line so jagged that no matter how far you zoom in, it never becomes smooth. He had no idea this shape would later appear in coastlines, snowflakes, lightning bolts, and blood vessels. Koch was making a mathematical counter-example. He accidentally described nature.
The Thue-Morse Sequence
Take any non-negative integer. Count the number of 1-bits in its binary representation. If that count is even, write 0. If odd, write 1. Do this for every integer from 0 onwards and you get: 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1... — the Thue-Morse sequence, independently discovered by Axel Thue in 1906 and Marston Morse in 1921. Now interpret 0 as "step forward" and 1 as "turn left 60°" — and watch the Koch snowflake fractal draw itself, emergent and complete, from nothing but the parity of binary digits.