Ouchi Illusion

Author

Eric W. Weisstein
September 5, 2003

This notebook downloaded from http://mathworld.wolfram.com/notebooks/RecreationalMath/OuchiIllusion.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/OuchiIllusion.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Initialization

<<Graphics`InequalityGraphics`

Code

Ouchi[{x_,y_},l_,r_]:={Table[
Rectangle[{i,l(j+Mod[i+j,2])},{i+1,l(j+Mod[i+j,2]+1)}],
{i,-x/2,(x-1)/2},{j,-(y+1)/2,y/2}],
{GrayLevel[1],Disk[{0,0},r]},
Table[
CutRectangle[{l i,(j+Mod[i+j,2])},{l(i+1),(j+Mod[i+j,2]+1)},r],
{i,-(r+.4)/l,r/l},{j,-r-1.4,r}]
}

CutRectangle[x__List,r_]:=Module[{xx,yy,
vdist=Norm/@Flatten[Transpose[Outer[List,Sequence@@Transpose[{x}],1]],1]//N
},
Which[
And@@Thread[vdist>r],Sequence@@{},
And@@Thread[vdist<r],Rectangle[x],
True,InequalityPlot[
And@@Less@@@Transpose[Insert[{x},{xx,yy},2]]&&xx^2+yy^2<r^2,
{xx},{yy},
Fills->GrayLevel[0],DisplayFunction->Identity][[1]]
]
]

Figure

Show[Graphics[Ouchi[{21,40},.4,5]],AspectRatio->Automatic]