A curiosity journal of math, physics, programming, astronomy, and more.

Procedural generation by hand

Years ago I was on project with a lot of meetings, so to occupy my hands I began drawing these tedious little patterns on the index cards stocked in the company conference rooms. The pattern would start as a perimeter of regularly spaced dots:

Dots outlining a square grid.

Then I would place dots at select points in the grid, aiming for about 50% coverage:

Dots placed randomly inside the grid.

Usually the dots were chosen arbitrarily, other times I used bits of text to determine where dots went (letters A through M got a dot, N through Z didn't). Occasionally I tried something more structured, but as the point was to occupy my hands and free my brain to participate in the meeting, most often I placed dots at random.

Once I constructed such a dot array, I would connect pairs of dots, starting at the leftmost column:

Pairs of dots connected along the left edge.

In the second column, I liked to start at the second dot down, rather than the first:

Pairs of dots connected in the second column, offset by one dot.

The rest of the columns would alternate between starting at the first dot or starting at the second, however far down it may be:

Pairs of dots connected in the rest of the columns, alternating between starting at the first dot and starting at the second.

Then the same thing but horizontally:

Rows of dots connected similarly.

Finally, I shaded in regions such that no adjacent regions had the same color:

Regions shaded in a checkerboard pattern.

This doesn't take very long with a 10×10 grid, so for long meetings, I would make it as big as I could (on an index card):

A grid with more columns and rows.

To me these self-intersecting-designs that look like QR codes are evocative of procedurally generated caves, dungeons, and starship corridors.

I'll explore some variations of this process in the next post.