This post works best on desktop.

A long time ago at a CSC Code Party I wrote this thing that generated pretty images. It’s running in the background of this webpage.

I like to watch it. It reminds me of geography, or maps. And the colors!

It's better fullscreen.

Why is it so slow? At 1080p, it takes twenty seconds to complete a cycle of 100 paints on my M1 Pro. What does this algorithm do?

How do these images get generated?

  1. Run a random walk across the grid.
  2. Pick a random spot on the grid
  3. From there, BFS locations not visited by the random walk.
    1. If we visit at least a fiftieth of the total area of the of the grid, we paint that this section.
    2. If we haven't, we try one more time.