How to make an image sequence from a cellular automaton simulation

  • Download Golly, the best program for cellular automata (and it’s open source !). Installation is not required.
  • In the extracted Golly directory, create a new folder named My-scripts
  • Download this lua script (made by Andrew Trevorrow) and put it in My-scripts
  • Open Golly
  • In the side panel, expand Patterns :
    ⁣⁣⁣ ⁣ ⁣ ⁣ You’ll find a bunch of cellular automata patterns classified by rules and pattern types.

    The Game of Life patterns are in the Life folder.

    You can also draw your own pattern with the pencil or even import an image (explained at the end)

  • Once you’ve found or made your pattern, you may want to change the background and cell colors by double-clicking on the colored square (the background is grey by default) :

  • Select the area you want to render in your image sequence with the rectangle select tool :

    keep in mind that the pattern will expand in the next generations but your rectangle will keep its size

  • In the side panel, under My-scripts, click on BMP-sequence.lua :
    01
  • Input your number of frames and click OK :

    The frames will be exported in the same directory as the script.

For more customized patterns, you can import an image using the image_import.py script (provided here) :

08

To use it, close Golly, place the script under My-scripts and re-open Golly. Then find it in the side panel and click on it.
If an error pops up when you run the image_import.py script, chances are you didn’t install the Python Imaging Library (PIL or Pillow). Make sure to have the appropriate one for your Python version and operating system.

I hope you succeeded in making your image sequence. If you have trouble, you can comment here and I’ll do my best to help you but you may find much more qualified people in the ConwayLife Forum.

Have fun with Golly !