a reproducible gallery of statistical graphics
This article demonstrates how to make visual
illusions with R. A visual illusion is a distortion
of form, size or color in the visual field. In the animation
package, functions vi.grid.illusion()
and vi.lilac.chaser()
can
be used to produce visual illusions.
vi.grid.illusion()
function provides illustrations for the Scintillating grid illusion and
Hermann grid illusion. They are two most common types of grid
illusions.
You can see dark dots appear and disappear rapidly at random intersections.
From Hermann grid illusion picture, you can see grey blobs disappear when looking directly at an intersection.
We can draw a Lilac chaser with the function
vi.lilac.chaser()
.
Stare at the center cross for a few (say 30) seconds to experience the illusion.
Don’t worry if you can’t see all the phenomena described. For many illusions, there is a percentage of people with perfectly normal vision who just don’t see it, often for reasons currently unknown.
You can see more illusions created by Kohske in R, which also illustrated the power of the grid package.