Kanizsa Polygon Illusion

Manipulate[With[{t=Table[{Cos[Pi a],Sin[Pi a]},{a,0,2-2/(k),2./(k)}]},Graphics[{Disk[#,2Sin[Pi/k]/3]&/@t,White,Thickness[Sin[Pi/k]/12],If[v==0,Line,Polygon][t]},PlotRange->{{-1,1},{-1,1}}7/4,ImageSize->375]],{{k,6,"number of vertices"},3,17,1},{{v,0,""},{0->Line,1->Polygon}}]

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Kanizsa Polygon Illusion" from The Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/KanizsaPolygonIllusion/

Contributed by: Michael Schreiber

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 »