Munching Squares

Author

Eric W. Weisstein
February 12, 2008

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

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

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

Graphic

Show[GraphicsArray[
Partition[Table[ListDensityPlot[Table[If[BitXor[x,y]<t,1,0],{x,0,15},{y,0,15}],
FrameTicks->None,
DisplayFunction->Identity
],{t,15}],5]
]]

Animation

Export[gifs<>"/munchsq.gif",Table[ListDensityPlot[Table[If[BitXor[x,y]<t,1,0],{x,0,15},{y,0,15}],
FrameTicks->None],{t,15}]
]//Timing

Using=n instead of<n

Show[GraphicsArray[
Partition[Table[ListDensityPlot[Table[If[BitXor[x,y]==t,1,0],{x,0,15},{y,0,15}],
FrameTicks->None,
DisplayFunction->Identity
],{t,15}],5]
]]