Skip to content

mscroggs/cellular-automata

Repository files navigation

Cellular automata

This repo contains code to draw svg images of cellular automata.

Rule 102

Example

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages