A Pi Fractal

Jack Hodkinson, who created the Corpus-Christi-College-shaped prime number that I mentioned last week, has sent along a remarkable followup produced by string rewriting. Here are the rules:

pi fractal - rewriting rules

The top row lists pixels of various colors; on each pass we’ll be replacing each of these with the 3 × 3 square beneath it. Start with a single color:

pi fractal - genesis

Following the associated rule produces a 3 × 3 array:

pi fractal - iteration 1

And so on:

pi fractal - iteration 2

pi fractal - iteration 3

After four iterations the rules produce a portrait of π:

pi fractal - iteration 4

And, charmingly, if we keep going, smaller πs begin to appear, due to the presence of dark pixels in the third image:

pi fractal - iteration 5

pi fractal - iteration 6

pi fractal - iteration 7

pi fractal - iterationl 8

And so on forever. “After iteration 8, it’s turtles all the way down.”

For those who want more information, Jack explains the rewriting rules in detail here.

(Note: To conserve bandwidth I’ve had to reduce the last two images above — you can find the full-resolution PNGs in this imgur gallery.)