# Applying Marching Squares to Conway's Game of Life

Conway's Game of Life is a grid-based cellular automaton and the marching squares algorithm is used to turn a grid of cells into contours of areas where the cells are ON.

Since they both live on a grid, I thought I should try applying the marching squares algorithm to the grids generated by the Game of Life.

## Animation

## Static frames

I experimented with filling the islands with a color. I'm thinking about layering a couple of those while changing the foreground color (white here) according to a predefined palette. It could be an interesting generative default avatar for user profiles, where every user would have a unique and interesting profile pricture determined by something like the hash of their username.

## Modifying marching squares

An interesting thing happened when I realised that I can tell the marching squares algorithm to connect islands if two cells are diagonal to each other. See these videos for the difference.

The first one treats cells that are diagonal to each other as not connected - not being part of one island. And the second one does the opposite. Both of these videos show the same game of life run, only differing by the marching squares strategy used.