Two properties of the visual system combine to produce the effect illustrated here: its tendency to make automatic associations between similar objects, and, at a somewhat higher level, its ability to choose the most "natural" of a set of possible interpretations.
The illusion is created by cycling repeatedly through a set of four images. The first and third show alternating white and black squares while the second and fourth show alternating green and red squares shifted by half a square width with respect to the intervening black and white patterns. When the particular shades of red and green differ sufficiently in their luminance component, the visual system naturally associates the darker colour with black and the lighter one with white. This induces a perception of motion toward the right because the most natural interpretation is that of a light/dark pattern that shifts half a block width to the right in each successive frame (the less naturally interpretation being a shift of three half block widths to the left).
When the red and green colours are adjusted so as to be equiluminous the association between light and dark squares becomes ambiguous, so it is unclear whether the coloured pattern represents a shift to the right or left. In this circumstance, the illusion of motion is destroyed. This simple effect has a number of both important and useful consequences, discussed below.
The applet window for this demonstration contains a horizontal row of squares of alternating colours and a number of controls for adjusting its appearance, as described below. The order in which the controls are listed here has proven to be a useful one in which to use them when showing the demonstration to an audience.
This is usually a convincing demonstration of the visual system's ability to make automatic associations and to interpret changes in position as motion. It also illustrates what happens when the visual system is provided with insufficient information to make a reasonable selection from a set of alternatives (in this case, choosing between rightward and leftward motion when the red and green squares are equiluminous), and it allows you to explore the limits of motion interpolation by lengthening the pause between successive frames until the illusion of motion breaks down. These are all factors that must be considered when choosing parameters for an animated display.
Unlike many of the other illusions in this collection, this demonstration can also be put to practical use. (Actually, you would need a slightly more flexible implementation that allowed you to replace green or red with any particular hue and that displayed the numeric value of the luminance ratio; furthermore, better ways of achieving the same goals are usually available.)
For example, you can use it to calibrate your CRT display if you know the relative intensities at which its phosphors should be equiluminous. You would set the relative intensities of the red and green squares to this value, then adjust the red or green electron guns until the illusion of motion was destroyed, indicating perceptual equiluminance.
Similarly, if you wanted to know the relative intensity at which two hues are equiluminous, you would replace red and green with those colours and adjust their intensities until the illusion of motion was again destroyed.