# Worlds of Symmetry

### Generating intricate designs using cellular automata

*Seduced by Islamic art, that’s me. For even though I’m Allah-free, I’m an addict of its symmetry. (And the works of Ernst Chladni.)*

Create a grid of zeros. Put a one in the middle. Then, replace each cell with a new value, calculated by adding up all its neighbors, then applying some oscillating function like *mod* or *sine*. Do this 50-100 times, then look upon the magic ye hath wrought.

The

modfunction, like a clock, lets values can grow up to a point, then makes them periodically start over. (e.g. 1, 2, 3, 1, 2, 3, 1…)Sineis another periodic function. It always outputs values between -1 and 1.

You end up with patterns like this:

Which you can post-process (e.g. with Prisma):

Or, if you throw a word on top and run the program some more, you’ll get this:

Those are all up-down and left-right symmetric, but you can start off with a grid that’s only left-right symmetric, and end up with things that look like alien faces. (See video.)

With these and other tools, the future is bright for the symmetrists among us!

For more pics and technical details, see my thread, or these two threads from my Twitter buddy Murat (they were the inspiration for all this, so thanks Murat!)

If you liked this post, you’d probably enjoy these two too: