Length of Line Illusion

Manipulate[
α=1; b=0.7;
vA={0,0};vB={b,0};
vC={b+Cos[α],Sin[α]};
vD={b+Cos[α]+a Cos[α],Sin[α]+a Sin[α] };
vE={Cos[α]+a Cos[α],Sin[α]+a Sin[α]};
vF={Cos[α],Sin[α]};
AB=Line[{vA,vB}];BD=Line[{vB,vD}];
DE=Line[{vD,vE}];EA=Line[{vE,vA}];
BF={Red,Thick,Line[{vB,vF}]};DF={Red,Thick,Line[{vD,vF}]};
FC=Line[{vF,vC}];
tri1={Green,Polygon[{vD,vE,vF}]};
tri2={Opacity[0.6],RGBColor[0.4,0.7,0.5],Polygon[{vA,vB,vF}]};
check=Rotate[{tri1,DF},rot,{Cos[α],Sin[α]}];
Graphics[{AB,BD,DE,EA,BF,DF,check,FC,tri2},PlotRange->{{-0.1,2},{-0.5,1.8}},ImageSize->360],
{{a,0.5,"adjust"},0,0.7},
{{rot,0,"check"},0,-2},TrackedSymbols->Manipulate]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Length of Line Illusion" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/LengthOfLineIllusion/

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 »