Explanation

Cellular Automata is a process in which the there is one row of pixels, each filled with one of "k" colors. The starting row is predetermined, and after that the rows are calculated based on the values of the rule number, range, and number of colors. In the most basic form, there are only two colors and the range is 1, which means that each pixel is determined by the pixel above it and the one above diagonally to either side. Then to determine which color to fill in the current pixel, it converts the rule number to base "k", the number of colors. In the case of two colors, it is binary. Next, it assigns a possible combination of "parents" (the pixels above) to each digit in the rule converted to the correct base. Then it fills in that pixel based on the value of that digit.


For two colors, the most famous rule is rule 110, or 01101110 in binary. To determine the next row, the algorithm would use the table below:

Parent combination111110101100011010001000
Pixel Value01101110


Another fun combination is rule 2845749852 with range of 2 and colors of your choice. But put in your own set of rules, and see what the design makes!

Depending on the range, it may take a long time to draw the initial image


Colors:

Starting color gradient - RED (0-255)
Starting color gradient - GREEN (0-255)
Starting color gradient - BLUE (0-255)

Starting color gradient - RED (0-255)
Starting color gradient - GREEN (0-255)
Starting color gradient - BLUE (0-255)

Input rule number
Input range (number of pixels to each side taken into account)
Input number of colors
Zoom factor: