Saturday, February 05, 2011

[fbgkeyqs] Life animation

A meditatively slow display of Conway's game of life.

Large cells.  Most dead cells are black.  Cells which are dead because of overcrowding have a dull purple blob in the center which does not extend all the way to the edges of the cell.  Live cells doomed to die the next generation due to overcrowding are red.  Due to isolation are blue.  Continuing live cells are green.

The state transitions are animated with color gradients, which is why it operates slowly.  Death happens from the center of a cell, with a black or purple blob growing from the center, out.  The edges remain colored until the last possible moment, so they can affect the birth or death of a neighboring cell.

Birth happens from the edges or corners, specifically the exactly three neighboring cells inject life into the cell coming alive: the animation is like diffusion of a dye.  Cells are born the right color: red, blue, or green.

Transition from green to red (overcrowding) also happens from the outside, in, with the 4 to 8 neighbors injecting red dye.  Some of those neighbors might be in the process of being born, but fortunately the common edge or corner is colored because the dying cell contributes life to the cell being born.

Transition from green to blue also happens from the outside, in, with the 7 or 8 empty neighbors causing the cell to turn blue with cold from the edges.  The corner or edge with the one live neighbor (if there is one) is the last to turn blue.  Again, if the one live neighbor is being born, that edge or corner won't black.

Transition from black to purple and the other way are straightforward, with a center blob growing or shrinking, not reaching the edge.

Instead of solving the diffusion partial differential equation each time, how many canned animations do we need? How many ways of distinctly choosing among the edges and corners of a square?

Isolation 3

Overcrowding
8 1
7 2
6 2+2+2 6
5 1+1+4+4 10
4 1+1+2+2+(2 edges and 2 corners =6) 12

Purple blob 2
Death 1
Total 37, which are rotated, reflected, color mapped, and overlaid as necessary.

For an unattended demo, a screensaver or live wallpaper, the pattern should be an oscillator.  I like Kok's Galaxy or the Tumbler.

A large display could have 8 copies of the animation (for Galaxy) so all phases shown at once.  The eye can look backward or fast forward in time if it wants to.

Maybe the ensemble itself rotates so that the same phase always ends up in the same location.  Rotation should probably be like cars on a Ferris wheel so up remains up, though maybe fixed rotation would look better.

No comments :