Draws Koch's curve from the Thue-Morse sequence.



Open in new tab

Draws Koch’s curve by following the Thue-Morse Sequence.

The sequence can be derived a few ways, but the way I do it here is just counting the number of 1’s in each consecutive binary number.

If the result is odd, move forward, otherwise, rotate by 60 degrees.



Tags: calculation graphics math simple