Cellular Automata
- by James Rogers
Each
pixel's colour is determined by the colours of the three pixels above
it (immediately above, one to the left, one to the right). This is
known as the rule.
The rule is displayed at the top. Since there are three colours (red,
green and blue), there are 27 combinations (red, red, red; red, red,
green; red, red, blue; etc).
The panel on the right displays the generated pattern, while the panel
on the left shows a close up.
By picking any pixel in the left panel and examining the three pixels
above it, it can be seen from the rule how the pixel's colour is
determined.

When New Rule is clicked, the
program randomly assigns new colours to each of the 27 colour
combinations, randomly chooses a background colour (every pixel is
initially set to this colour) and randomly chooses a different colour
for the top row's central pixel (ie: if the background is green, the
central pixel will be either red or blue).
Then the program steps through the iterations of colouring each row by
examining the row above.
The user can at anytime pause this process by clicking Pause, or start the process again by
clicking New Rule.
If Automatic New Rule is
selected, when the right panel is completely filled, the program starts
again with a new rule. If Automatic New Rule is not selected,
the right panel scrolls, continuing with the current rule.
Note: ordinarily, there are no left and right boundaries. However, this
program behaves as if the pixel beyond the panel to the left and right
are always the background colour. This results in more interesting
patterns.
Get the
standalone JAR file