Board

The Board pattern starts with a square and replaces each side using F → FF+F+F+F+FF, where F draws a step and each plus makes a 90-degree turn.1 Reading that rule, the pen goes forward two steps, makes three right-angle turns with one forward step after each turn, then turns once more and goes forward two steps. That is a seven-line path with a small square loop in it, and it finishes three step lengths ahead of where it started, so each new step is one third of the old line.

After the loop, the pen's next step goes over the line it drew just before the loop: the middle third of the old line. So seven strokes draw six different lines. The tint shows how many times each line has been drawn, and at level 2, the middle of each side of the square is drawn twice.

Those two strokes run in the same direction, so at the next level their replacements land exactly on top of each other. Five of the six new lines are drawn twice, and the middle one is drawn four times. Since this happens again at every level, the line at the very middle of each side of the square is drawn 2, 4, 8, 16, then 32 times from level 2 to level 6. At level 4, it is the yellow line.

Each level multiplies the pen strokes by seven and the different lines by only six. At level 6, the pen makes 67,228 strokes to draw 31,104 different lines, and if you repeat forever, almost every stroke goes over a line already drawn.2

Crystal also draws a line twice, but out and back. Its two replacements land in different places, so no line there is ever drawn more than twice.

Further exploring

Videos

Reading

Sources and notes

  1. Przemysław Prusinkiewicz and Aristid Lindenmayer, The Algorithmic Beauty of Plants, chapter 1, Springer-Verlag, 1990. Background on replacing letters and reading them as drawing instructions, sections 1.2–1.3.
  2. Calculation. Strokes in the same place and direction get the same replacement, and the replacements of different lines share no lines. So every different line becomes six. Counted on an exact grid for levels 1 to 6: level n+1n+1 has 4⋅7n4\cdot7^n strokes and 4⋅6n4\cdot6^n different lines, so the share of strokes that draw a new line is (6/7)n(6/7)^n. No line is drawn in both directions.