Pages

Sunday, April 13, 2025

Tess-Elation

This week something brought to mind a computer program I had growing up called TesselMania. It was a kids' art program for making tessellations, a type of repeating tiling of a plane. What stuck in my mind as I thought back to it was the question of how to generate such tilings – The program let you manipulate a shape, but it would make changes in reaction to your adjustments to maintain the necessary symmetries. I wondered what the precise rules were for maintaining a shape that could be tessellated.

I couldn't find a really general technique – I imagined there would be a wealth of math papers on the topic, but maybe I didn't dig deep enough. What I did find was an Instructables page about making tessellations with paper tiles. This gave a good recipe I could follow for my own program:

  1. Start with a square tile
  2. Cut a shape from the top side of the tile
  3. Rotate the shape around the top right corner of the square to join it to the right side
  4. Cut a shape from the bottom of the tile
  5. Rotate the shape around the bottom left corner of the square to join it to the left side

I was able to translate this into a Python script which works nicely! As above, I start with a square and divide the top and bottom lines into N points. Each point gets displaced randomly up or down, and then we apply the transforms described to get the sides. Once we have one tile, we can rotate it around the corners to make a grid:

N = 4

N = 6

N = 10

I was pretty happy with this, but a little unsatisfied with the spikiness – To me, tessellations with curvy bits feel more impressive. I wondered if I could take the points I was using to make the tiles and run them through a spline interpolator to smooth things out. For a simple solution, that gave some nice results:

N = 4

N = 6

N = 10

The N = 10 case is still a bit spiky, but 4 and 6 have some nice blobbiness! Still missing is fully interlocking designs, since that would require a more complicated definition of the tile edges, but since it's been over a month since I last got something up here, I thought I should do my best to wrap something up, rather than let it sit forever in my growing "Unfinished" folder. If there are any other TesselMania fans out there, I hope you'll give my script a try!

No comments:

Post a Comment