Five Colour Cellular Automaton
Applet Controls

Map The pattern is generated by taking three adjacent cells in a row, adding up their colour values and the looking up the new colour in the map. The colour values are red (0), orange (1), yellow (2), green (3) and blue (4). The range of possible totals ranges from 0 (0+0+0) to 12 (4+4+4), 13 values in all. The cells in the map correspond to these values, so in the illustration, 0, 1, 2 are red, 3 is yellow, 4 is red, 5 is blue, etc.
Left Boundary Colour The initial pattern is assumed to have an unlimited extent though only a finite number of cells can be shown. All the cells to the left of the pattern are assumed to be this colour (blue in the illustration).
Right Boundary Colour All cells to the right of the pattern are assumed to be this colour.
First Row This determines the cells in the first row and seeds the rest of the pattern.
Scroller This is used to scroll around the pattern (the pattern is of infinite extent though scrolling is limited in the horizontal direction by the range of possible integer values in the computer (probably plus or minus 2 billion). You can't scroll off the top and scrolling downwards is limited by the memory available to the Java engine. Each row is an array of integers and usually has roughly 2N entries (the algorithm is optimised so that if the rows are shorter than expected less memory is required). To view the Nth row you will allocate memory for about N2 integers.

The arrows scroll 1/4 of a screen in the corresponding direction. If you click inside the darker circle you will scroll 1 cell.
Bigger Cells Increases the size of the squares used to draw the pattern by 1 pixel.
Smaller Cells Decreases the size of the squares by 1 pixel. The smallest square is 1 x 1.
Home Returns the view to the original position with the default cell size.