This repo contains code to draw svg images of cellular automata.
Before using this code, you should install the Python dependencies:
pip3 install -r requirements.txt
To make an image, first import the Automaton
class:
from automaton import Automaton
Next, create your automaton. For example to create an automaton using rule 102, run:
a = Automaton(102)
You can then use the automaton to generate rows of information. For example, you can create 400 rows by running:
a.generate(400)
Finally, you can save the image as a SVG by running:
a.save_image("rule102.svg")
This full example is included in the file draw.py
.