Fibonacci Word Fractal
Start with 0, then replace every 0 with 01 and every 1 with 0, applying the replacements to the entire old string before using the new one.
The strings begin 0, 01, 010, 01001, 01001010. Their lengths are 1, 2, 3, 5 and 8: each length adds the two before it.1 The figure calls 01 level 1, 010 level 2, and so on.
To draw a string, each digit draws a line forward. After a 1, continue in the same direction. After a 0, turn right if it is in an odd-numbered position and left if it is in an even-numbered position, counting positions from one. The default turn is 90 degrees.
Each string is the previous two joined: 01001 is 010 followed by 01. Joining moves every digit of the second string along by the first one's length, so if that length is odd, odd positions become even and even positions become odd. All the second string's turns then reverse, and it draws as a mirror image. If the length is even, it keeps its turns.1
The first string always starts with the second one, so you can compare them on screen by choosing Two strings. At level 6, the blue part is the start of the gold part flipped over, and at level 5 it is the start of the gold part turned.
The lengths run odd, even, odd, odd, even, odd, odd, even. An even length needs two odd lengths before it, so it comes only every third level, and the picture repeats every three levels too. Compare levels 6, 9 and 12: each is the one before turned a quarter turn, with finer detail.1
Line counts are Fibonacci numbers, which grow by about 1.618 each level, a number called the golden ratio. Over three levels the lines multiply by .1 The picture grows more slowly: the distance from the path's start to its end grows only about 2.414 times.
Choose Five pieces to see why. The dashed line shows that distance. From level 5 on, the path divides into five pieces, some of them mirror images: two copies of the curve from three levels back, one copy from six levels back, and two more from three levels back. At level 12 they have 89, 89, 21, 89 and 89 lines, and all five add lines: .1
Only three add distance. At level 12 the first piece goes down, the next three go across, and the last comes back up, so down and up cancel. The three across add up to , which puts the end line lengths from the start.2 Levels 6, 9, 15 and 18 work the same way.
That sum sets the growth. If each distance is times the one three levels before, dividing by 17 gives . The only positive number that fits is , called the silver ratio.1
Further exploring
- Fibonacci word fractal — Wikipedia
- Properties and Generalizations of the Fibonacci Word Fractal — The Mathematica Journal
Sources and notes
- The Fibonacci Word Fractal.
- Calculation. Checked in whole line lengths on this page's path for levels 6, 9, 12, 15 and 18. The last two pieces each end on a line that differs from a true copy, and those two differences cancel. At the levels between, the dashed line runs at a slant and the sum is not exact, though the growth is the same.