Orbison's Illusion

Manipulate[
d=1.4;r=0.8;
vA={0,0};vB=d{-Cos[α],Sin[α]};vC=d{-Cos[α],-Sin[α]};
AB=Line[{vA,vB}];AC=Line[{vA,vC}];vD={0.4,0};
vE={0,0.4 ad};vE1={0,0.4};vF={-0.4,0};vG={0,-0.4ad};
vG1={0,-0.4};
sq={Translate[Line[{vD,vE,vF,vG,vD}],{r,0}]};
fish={RGBColor[0.2,0.2,0.5],Table[Translate[{AB,AC},{i 3/n,0}],{i,n}]};
pol={Yellow,EdgeForm[Red],Translate[Polygon[{vD,vE1,vF,vG1}],{r,0}]};
frame={Blue,Thick,Line[{{-0.1,-Sin[α] d},{2r,-Sin[α] d},{2r,Sin[α] d},{-0.1,Sin[α] d},{-0.1,-Sin[α] d}}]};
Graphics[{If[pols,pol,{}],sq,AB,AC,fish,frame},PlotRange->{{-0.1,2.01r},{-0.8,0.8}},ImageSize->{400,400}],
{{ad,1.3,"adjust rhombus"},0.7,1.4,ImageSize->Tiny},
{{pols,False,"check square"},{True,False}},
{{α,0.24,"inclination"},0.2,0.6,ImageSize->Tiny},
{{n,30,"frequency"},10,40,1,ImageSize->Tiny},
TrackedSymbols->Manipulate,ControlPlacement->Left]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Orbison's Illusion" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/OrbisonsIllusion/

Contributed by: Sándor Kabai

A full-function Wolfram Mathematica 6 system is required to edit this notebook.
GET WOLFRAM MATHEMATICA 6 »

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