A java applet that does a visualization of a two-dimensional induction.

Visualizing Induction

The image is created by coloring the left and right borders with an initial color (represented by an integer in the range 0 to 15), and the origin with another color. The program then chooses a color for other pixels by using a color function on the color values of the three neighboring pixels that have already been colored.

The color function is:

pixel(i,j) = [⌊(pixel(i-1,j-1) + pixel(i,j-1) + pixel(i-1,j))/3⌋
              + shift*pixel(i-1,j-1)] mod 16
where shift is an integer between 0 and 15 and ⌊x⌋ truncates any fractional part of x.