Parallel Lines Optical Illusion

Manipulate[Graphics[{
EdgeForm[{AbsoluteThickness[2],Gray}],AbsoluteThickness[3],
Table[Rectangle[{x+t Sin[4Pi/8y],y},{x+t Sin[4Pi/8y]+1,y+1}],{x,1,2n-1,2},{y,0,m-1}],
Gray,Line[Table[{{0,y},{2n+1,y}},{y,0,m-1}]]},ImageSize->{500,400}],
{{t,0.4,"horizontal shift"},-1,1},
{{n,7,"number of columns"},2,10,1},
{{m,8,"number of rows"},2,14,1}]

CAPTION

This optical illusion is more effective for certain parameters than others. What settings make the lines look least parallel to you?

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Parallel Lines Optical Illusion" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/ParallelLinesOpticalIllusion/

Contributed by: Theodore Gray

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »