Image or text rendering of {2β9}-states cellular automata.
GET /cellular_automata/img.php ? s=2 & ...
GET /cellular_automata/text.php ? s=8 & ...
parameter name | shortcut | defines |
---|---|---|
states | s | The number of states (2 to 9) |
order | o | The order (1 or 2 ) |
width | w | The width in pixels |
height | h | The height in pixels |
pixel_size | p | A cell size in pixels |
rule_number | n | The rule number or random ( {0 β 256} for 2 states, {0 β 134217728} for 3, etc) (try 110 or 73 for 2 states) |
random_start | start | The first line is random or a single centered point |
color0 | bg | The base color |
color1 | c1 | The first color |
color2 | c2 | The second color |
color3 | c3 | The third color, etc |
All parameters are optional, default are defined for everything
From the folder, launch php -S localhost:1234
and go to that url. Needs PHP8 (WIP: will run on docker later)
php app/tests.php
That was my first personal project as a brand new developer :) The code was therefore very minimalist (if not plain dirty).
I'm occasionaly trying to keep it in shape and adding new features. The only rule is no framework, no external library, as much from scratch as possible.
- Add more than 2 states
- Make a text automata
- Add 2nd order
- Add docker
- Add tests
Last changes (see all)
- New UI
2 states
3 states
5 states
2 states
5 states
βββ»β»ββββ»ββ»βββββ»βββββββ»β»β»βββ»β»ββ»ββ»βββββ»ββββ»βββββββββββ»βββ»ββ»β»ββ»βββββ»β»β»
ββββββββββββββββββββ»βββββββββββββββββββββββββββββββββββββββββββββββ
βββββ»ββββ»ββββββββ»ββββββββββββββββ»βββββββββ»βββββββββ»βββββ»βββ»ββββββββ
βββββββββββββββββββββ»βββββββββββββββ»βββββββββββββββββββββββββββββββ
βββββββββββ»ββββββββ»βββββββββββββββββββββββββ»βββββββββ»βββββ»βββ»ββββββ
βββββββββββββββββββββββ»βββββββββββββββ»βββββββββββββββββββββββββββββ
βββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββββββββ»βββββ»βββ»ββββ
βββββββββββββββββββββββββ»βββββββββββββββ»βββββββββββββββββββββββββββ
βββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββββββββ»βββββ»βββ»ββ
βββββββββββββββββββββββββββ»βββββββββββββββ»βββββββββββββββββββββββββ
βββββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββββββββ»βββββ»βββ»
βββββββββββββββββββββββββββββ»βββββββββββββββ»βββββββββββββββββββββββ
ββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββββββββ»βββββ»β
βββββββββββββββββββββββββββββββ»βββββββββββββββ»βββββββββββββββββββββ
β»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββββββββ»ββββ
βββββββββββββββββββββββββββββββββ»βββββββββββββββ»βββββββββββββββββββ
βββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββββββββ»ββ
βββββββββββββββββββββββββββββββββββ»βββββββββββββββ»βββββββββββββββββ
βββββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββββββββ»
βββββββββββββββββββββββββββββββββββββ»βββββββββββββββ»βββββββββββββββ
ββ»βββββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββββββ
βββββββββββββββββββββββββββββββββββββββ»βββββββββββββββ»βββββββββββββ
ββββ»βββββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββββ
βββββββββββββββββββββββββββββββββββββββββ»βββββββββββββββ»βββββββββββ
ββββββ»βββββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»βββ
βββββββββββββββββββββββββββββββββββββββββββ»βββββββββββββββ»βββββββββ
ββββββββ»βββββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»βββββββββββ»β
βββββββββββββββββββββββββββββββββββββββββββββ»βββββββββββββββ»βββββββ
β»βββββββββ»βββββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»ββββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββ»βββββββββββββββ»βββββ
βββ»βββββββββ»βββββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»ββββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββ»βββββββββββββββ»βββ
βββββ»βββββββββ»βββββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»ββββββ
βββββββββββββββββββββββββββββββββββββββββββββββββββ»βββββββββββββββ»β
βββββββ»βββββββββ»βββββ»βββ»βββββββββββββββββ»βββββββ»βββββββββββββββ»ββββ