More documentation about Automata and their implementation on eliseduverdier.github.io/cellular-automata-go/.
Generates elementary cellular automata images, with 2 to 9 states, or 1st and 2nd order, with customizable size, colors, and points distribution, using Go
ββ β β ββ βββ β βββ ββ β β ββ β ββ β β ββ β β β β β β ββ β ββ ββ β β β β ββ β β ββ β β β β β β β β β β β β β β β β ββ ββ β β β β β β β β β β β β β β ββ β β β β β β β ββ β β ββ β β β β β β β β β β β ββ β β β β ββ β β β β β β β β β β β β β β β β β β β β β β β β β β β β β β ββ ββ β β β β ββ β β β β β β β β β β β β β β β β β β ββ ββ ββ β β β β β β β β β β β β β β β β β β β β β β β β ββ β β ββ ββ β
PORT=8888 go run main.go
Then go to http://localhost:8888/text or http://localhost:8888/image and use GET parameters (listed below)
option | role |
---|---|
s | number of states (>2) |
o | order (1 or 2) |
r | rule number |
w | width in pixels |
h | height in pixels |
p | size of one cell in pixels (1 < p < 20) |
start | first line strategy ("random", "centered", "left", "right", see below) |
line | a sequence of numbers representing the first line like "0000010..." |
# run tests
make test
# generate code coverage
make coverage
# lint (needs https://golangci-lint.run/)
make lint
- add docker
- add option to get dots bigger than 1px
- add option to choose custom colors
- Cache when rule isn't random
sudo apt-get purge golang\*
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt update
sudo apt install golang-go