What to see
The yellowish ring moves, covering either the left darkish disk or the right darkish disk. Grab it with the mouse and move it to the top, uncovering the discs, we need it later; this automatically also switches off “Autorun”.
Now compare the two grey disks, they are quite alike, no? Well, there's a little bit of halo around the left one.
What to do
Grab the yellow ring with the mouse again. Center it on the right disk – the dark center is visible in the hole. Now move it over to the left disk. Unexpectedly, the center shows the same lightness as the surround!
Using the stepper “Step %” at te bottom you can increase the contrast of the disk vs background. With high levels of contrast, it becomes obvious that the bottom left central disk has no constant grey level, rather a gradient: the inside has the surround level, it gets gradually darker, then a step to light, then gradually returning to baseline. The width of the gradient is controlled with “Rim”, its shape can be parabolar or linear, and it can be inverted.
This “Craik-O'Brien-Cornsweet Illusion” demonstrates that our visual system does not veridically transfer point lightness of our environment to the brain. Rather, the retinal ganglion cells encode the incoming luminance profile via their centre-surround luminance profile in “delta encoding”. In our cortex this is integrated so we perceive the veridical square luminance profile.
The profile of the Craik-O’Brien-Cornsweet disk on the left is (almost) a fixpoint for this encoding, thus sending a nearly identical spatial code up the cortex. The cortex thinks: “Oh, I know, that’s the ganglion cells doing their usual spiel”, integrates it and arrives at the same perceptual result (yes, I know this is a simplification).
There are interesting technical limitations here: The two disks look convincingly identical only for low values of the step size (e.g. 5%). Since there are only 256 grey levels available on current systems, this allows only for a few intermediate steps (5% step equals 2.5% step on either side, leaving at most 10 intermediate levels. When one looks closely, you can see them as “banding”, especially when spread out over a larger rim. This could be counteracted by dithering, but that would involve serious programming (no time), and would make the program slow.
O’Brien V (1959) Contrast by contour-enhancement. Am J Psychol 72:299–300
Craik KJW (1966) The nature of psychology (Sherwood SL, ed). Cambridge, UK: Cambridge UP
Cornsweet TN (1970) Visual perception. Academic, New York
Demo from Ted Adelson’s site