Explore Cellular Automaton Patterns
Explore Cellular Automaton Patterns
This document is a live Wolfram Notebook that mixes text and code.
Run any piece of code by clicking inside the code, then pressing +.
Run any piece of code by clicking inside the code, then pressing +.
Make a picture of a basic rule 30:
ArrayPlot[CellularAutomaton[30,{{1},0},50],Mesh->True]
Run it longer:
ArrayPlot[CellularAutomaton[30,{{1},0},500],ImageSize->Full]
Generate an image of rule 135:
ArrayPlot[CellularAutomaton[135,{{1},0},50],Mesh->True]
Show the rotated version:
Graphics[Rotate[First[ArrayPlot[CellularAutomaton[135,{{1},0},40],MeshTrue]],-45Degree]]
Show the region of the pattern actually used:
Graphics[Rotate[First[ArrayPlot[CellularAutomaton[135,{{1},0},80],MeshTrue]],-45Degree],PlotRange{{83,104},{-12,60}}]
Generate some examples of regions from the patterns:
Labeled[Graphics[Rotate[First[ArrayPlot[CellularAutomaton[#,{{1},0},{80,All}]]],-45Degree],PlotRange{{83,104},{-12,60}}],Text[StringTemplate["rule ``"][#]]]&/@{30,73,89,105,135,182,193}
Do the same thing with random initial conditions:
Labeled[Graphics[Rotate[First[ArrayPlot[CellularAutomaton[#,RandomInteger[1,160],{80,All}]]],-45Degree],PlotRange{{83,104},{-12,60}}],Text[StringTemplate["rule ``"][#]]]&/@{30,73,89,105,135,182,193}