Circular Chessboard

Author

Eric W. Weisstein
May 4, 2002

This notebook downloaded from http://mathworld.wolfram.com/notebooks/Games/CircularChessboard.nb.

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

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

Code

n=50;

CircularRing0[1,-1]:=Polygon[Table[{Cos[t],Sin[t]},{t,-Pi,0,Pi/n}]];

CircularRing0[r_,y_ ]:=Module[{t0=ArcTan[-Sqrt[2r-1],-r+1]//N},
		Polygon[Table[r{Cos[t],Sin[t]},{t,t0,-Pi-t0,(-2t0-Pi)/n}]]
] /; y==-r;

CircularRing0[r_,y_]:=Module[
		{
		t11=If[OddQ[r]&&y==-1,-Pi,ArcTan[-Sqrt[r^2-(y+1)^2],y+1]]//N,
		t12=If[OddQ[r]&&y==0,-Pi,ArcTan[-Sqrt[r^2-y^2],y]]//N,
	  t21=If[OddQ[r]&&y==-1,-Pi,ArcTan[-Sqrt[(r-1)^2-(y+1)^2],y+1]]//N,
		t22=If[OddQ[r]&&y==0,-Pi,ArcTan[-Sqrt[(r-1)^2-y^2],y]]//N,
		t
		},
	{Polygon[Join[
			Table[r{Cos[t],Sin[t]},{t,t11,t12,(t12-t11)/n}],
			Table[(r-1){Cos[t],Sin[t]},{t,t22,t21,-(t22-t21)/n}]
		]],
			Polygon[Join[
			Table[r{Cos[t],Sin[t]},{t,-(t11+Pi),-(t12+Pi),-(t12-t11)/n}],
			Table[(r-1){Cos[t],Sin[t]},{t,-(t22+Pi),-(t21+Pi),(t22-t21)/n}]
		]]
}
];

CircularRing[r_,y_]:={Circle[{0,0},r],CircularRing0[r,y]}

CircularRing[r_]:=Module[{n,y},Table[CircularRing[r,y],{y,-r,r-2,2}]]

CircularBoard[r_]:=Module[{n},Table[CircularRing[n],{n,r}]]

Graphic

Show[Graphics[CircularBoard[14]],AspectRatio->Automatic,PlotRange->All]