Spirograph

Author

Eric W. Weisstein
January 27, 2011

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PlaneCurves/Spirograph.nb.

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

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

Formula

Hypotrochoid[{R,r},ρ,θ]//ColumnForm//TraditionalForm

Arrays

MakeBoxes[label[{p_,q_}],TraditionalForm]:=RowBox[{RowBox[{"(",RowBox[{"p",",","q"}],")"}],"==",RowBox[{"(",RowBox[{MakeBoxes[p,TraditionalForm],",",MakeBoxes[q,TraditionalForm]}],")"}]}]

V5

Show[GraphicsArray[Graphics[{Red,#},AspectRatio->Automatic]&/@(Spirograph[Sequence@@s,#/10]&/@Range[10]),
AspectRatio->Automatic],
PlotLabel->TraditionalForm[label[Sequence@@s]],
ImageSize->500]

MakeBoxes[label[{p_,q_}],TraditionalForm]:=RowBox[{"(",RowBox[{MakeBoxes[p,TraditionalForm],",",MakeBoxes[q,TraditionalForm]}],")"}]

Show[Graphics[{MapIndexed[
{Text[TraditionalForm[label[#1]],{1,-4#2[[1]]}],Red,Table[Spirograph[#1,n/10,{4n,-4#2[[1]]}],{n,10}]}&,
{{1,3},{1,4},{1,5},{2,5},{2,7},{3,7}},{1}]}
],AspectRatio->Automatic,PlotRange->All]

movie=Table[Spirograph[{2,3},n], {n, .1, .5, .01}];

Show[Graphics[Table[Spirograph[{2,3},n],{n,0,.5,.05}]],AspectRatio->Automatic]

Show[Graphics[#,AspectRatio->Automatic,PlotRange->1.5{{-1,1},{-1,1}}]]&/@Table[Spirograph[{2,3},n],{n,0,1,.01}]

Show[movie]

V6

With[{s={1,3}},GraphicsRow[Spirograph[s,#/10,PlotStyle->Red]&/@Range[10],
PlotLabel->label[s]]]

GraphicsGrid[MapIndexed[
{Graphics[Text[StringReplace[ToString[#1],{"{"->"(","}"->")"}],{1,-4#2[[1]]}]],Sequence@@Table[Spirograph[#1,n/10,{4n,-4#2[[1]]},PlotStyle->Red,PlotRange->All],{n,10}]}&,
{{1,3},{1,4},{1,5},{2,5},{2,7},{3,7}},{1}],Spacings->{100,-100}]

movie=Table[Spirograph[{2,3},n], {n, .1, .5, .01}];

Show[Graphics[Table[Spirograph[{2,3},n],{n,0,.5,.05}]],AspectRatio->Automatic]

Show[Graphics[#,AspectRatio->Automatic,PlotRange->1.5{{-1,1},{-1,1}}]]&/@Table[Spirograph[{2,3},n],{n,0,1,.01}]

Show[movie]

Animation

Show/@GraphicsArray/@Transpose[Hypotrochoid[#,.5,{0,4Pi-.01,4Pi/20.},PlotRange->All]&/@{{2,1},{3,1},{3,2}}];

Show/@GraphicsArray/@Table[Hypotrochoid[#,i,{0,4Pi},Axes->None,PlotRange->{{-1,1},{-1,1}}4,DisplayFunction->Identity]&/@{{2,1},{3,1},{3,2}},{i,0,2,.04}];

Table[Hypotrochoid[{3,2},i,{0,4Pi},Axes->None],{i,0,2,.02}];

Hypotrochoid[{2,1},.2,{0,2Pi-.01,2Pi/20.},PlotRange->All];

SpiroArray[1,2]

Hypotrochoid[{3,1},2,{0,2Pi-.01,2Pi/20.},PlotRange->{{-1,1},{-1,1}}4];