Polyare

Author

Eric W. Weisstein
October 4, 2003

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

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

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

Code

square[x_,y_]:=Line[{{x,y},{x+1,y},{x+1,y+1},{x,y+1},{x,y}}];
filled[{x1_,y1_},{x2_,y2_}]:={{Red,Rectangle[{x1,y1},{x2,y2}]},Line[{{x1,y1},{x2,y1},{x2,y2},{x1,y2},{x1,y1}}]}

are[x_,y_,t]:={filled[{x,y+1/2},{x+1,y+1}],square[x,y]}
are[x_,y_,b]:={filled[{x,y},{x+1,y+1/2}],square[x,y]}
are[x_,y_,l]:={filled[{x,y},{x+1/2,y+1}],square[x,y]}
are[x_,y_,r]:={filled[{x+1/2,y},{x+1,y+1}],square[x,y]}

Graphics

V5

Show[Graphics[{
are[0,0,b],

are[0,-1.5,b],are[1,-1.5,b],
are[2.5,-1.5,b],are[3.5,-1.5,l],
are[5,-1.5,r],are[6,-1.5,l],

are[0,-4,b],are[1,-4,b],are[2,-4,b],
are[3.5,-4,b],are[4.5,-4,b],are[5.5,-4,l],
are[7,-4,r],are[8,-4,b],are[9,-4,l],
are[10.5,-4,t],are[11.5,-4,t],are[10.5,-3,b],
are[13,-4,t],are[14,-4,t],are[13,-3,l],
are[15.5,-4,t],are[16.5,-4,t],are[15.5,-3,r],
are[18,-4,t],are[19,-4,l],are[18,-3,b],
are[20.5,-4,t],are[21.5,-4,l],are[20.5,-3,r],
are[23,-4,t],are[24,-4,l],are[23,-3,l]

}],AspectRatio->Automatic]

V6

Graphics[{
are[0,0,b],

are[0,-1.5,b],are[1,-1.5,b],
are[2.5,-1.5,b],are[3.5,-1.5,l],
are[5,-1.5,r],are[6,-1.5,l],

are[0,-4,b],are[1,-4,b],are[2,-4,b],
are[3.5,-4,b],are[4.5,-4,b],are[5.5,-4,l],
are[7,-4,r],are[8,-4,b],are[9,-4,l],
are[10.5,-4,t],are[11.5,-4,t],are[10.5,-3,b],
are[13,-4,t],are[14,-4,t],are[13,-3,l],
are[15.5,-4,t],are[16.5,-4,t],are[15.5,-3,r],
are[18,-4,t],are[19,-4,l],are[18,-3,b],
are[20.5,-4,t],are[21.5,-4,l],are[20.5,-3,r],
are[23,-4,t],are[24,-4,l],are[23,-3,l]

}]