rule

31

seed

5f5bdb76

size

d078

unused

c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3

**26 Feb 2022**

Begin with an empty row of 0's and populate the center
with a bitstring taken from

`seed`

. Build a table
by converting

`rule`

to binary, and pairing each bit with a
number starting from 7 and decreasing to 0. For our above seed, rule 49 will generate the following table:seq | 111 | 110 | 101 | 100 | 011 | 010 | 001 | 000 |
---|---|---|---|---|---|---|---|---|

val | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 1 |

For each bit in the row, generate a three-bit string using the bit to
its left, the bit itself, and the bit to its right. Look up this value
in the table above, and assign

`val`

as the new bit. Finally draw the resulting row on the next line of the canvas.