Learn R Programming

animation (version 2.0-0)

vi.grid.illusion: Visual illusions: Scintillating grid illusion and Hermann grid illusion.

Description

Visual illusions: Scintillating grid illusion and Hermann grid illusion. The two most common types of grid illusions are Hermann grid illusions and Scintillating grid illusions. This function provides illustrations for both illusions.

Usage

vi.grid.illusion(nrow = 8, ncol = 8, lwd = 8, cex = 3, 
    col = "darkgray", type = c("s", "h"))

Arguments

nrow
number of rows for the grid
ncol
number of columns for the grid
lwd
line width for grid lines
cex
magnification for points in Scintillating grid illusions
col
color for grid lines
type
type of illusions: 's' for Scintillating grid illusions and 'h' for Hermann grid illusions

Value

  • None.

Details

A grid illusion is any kind of grid that deceives a person's vision. This is actually a static image; pay attention to the intersections of the grid and there seems to be some moving points (non-existent in fact).

References

http://en.wikipedia.org/wiki/Grid_illusion http://animation.yihui.name/animation:misc#visual_illusions

See Also

points, abline

Examples

Run this code
## default to be Scintillating grid illusions
vi.grid.illusion()

## set wider lines to see Hermann grid illusions
vi.grid.illusion(type = "h", lwd = 22, nrow = 5, ncol = 5, 
    col = "white")

Run the code above in your browser using DataLab