Different classes of cellular automata can be described by how many different states a cell can have (k), and how many neighbors on each side are examined (r). Fractint implements the binary nearest neighbor cellular automata (k=2,r=1), the binary next-nearest neighbor cellular automata (k=2,r=2), and the ternary nearest neighbor cellular automata (k=3,r=1) and several others.
The rules used here determine the next state of a given cell by using the sum of the states in the cell's neighborhood. The sum of the cells in the neighborhood are mapped by rule to the new value of the cell. For the binary nearest neighbor cellular automata, only the closest neighbor on each side is used. This results in a 4 digit rule controlling the generation of each new line: if each of the cells in the neighborhood is 1, the maximum sum is 1+1+1 = 3 and the sum can range from 0 to 3, or 4 values. This results in a 4 digit rule. For instance, in the rule 1010, starting from the right we have 0->0, 1->1, 2->0, 3->1. If the cell's neighborhood sums to 2, the new cell value would be 0.
For the next-nearest cellular automata (kr = 22), each pixel is determined from the pixel value and the two neighbors on each side. This results in a 6 digit rule.
For the ternary nearest neighbor cellular automata (kr = 31), each cell can have the value 0, 1, or 2. A single neighbor on each side is examined, resulting in a 7 digit rule.
kr #'s in rule example rule | kr #'s in rule example rule 21 4 1010 | 42 16 2300331230331001 31 7 1211001 | 23 8 10011001 41 10 3311100320 | 33 15 021110101210010 51 13 2114220444030 | 24 10 0101001110 61 16 3452355321541340 | 25 12 110101011001 22 6 011010 | 26 14 00001100000110 32 11 21212002010 | 27 16 0010000000000110
The starting row of cells can be set to a pattern of up to 16 digits or to a random pattern. The borders are set to zeros if a pattern is entered or are set randomly if the starting row is set randomly.
A zero rule will randomly generate the rule to use.
Hitting the space bar toggles between continuously generating the cellular automata and stopping at the end of the current screen.
Recommended reading: "Computer Software in Science and Mathematics", Stephen Wolfram, Scientific American, September, 1984. "Abstract Mathematical Art", Kenneth E. Perry, BYTE, December, 1986. "The Armchair Universe", A. K. Dewdney, W. H. Freeman and Company, 1988. "Complex Patterns Generated by Next Nearest Neighbors Cellular Automata", Wentian Li, Computers & Graphics, Volume 13, Number 4.