Maurer Rose

Author

Eric W. Weisstein
March 16, 2008

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

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

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

Additional Authors

Code based on
Mathematica in Action
Stan Wagon

Initialization

MaurerRose::usage="MaurerRose[n,d,z].  Varying z changes the size of a 'degree.'";

MaurerRose[n_Integer,d_Integer,z_Integer:360]:=Block[{zz=If[!EvenQ[n]&&z==360,180,z]},rect[theta_,r_]:={r Cos[theta],r Sin[theta]}//N;
rose[i_]:=rect[i 2 Pi/z,Sin[n i 2 Pi/z]];
Attributes[rose]={Listable};
Table[Line[rose[Range[m,m+LCM[d,zz],d]]],{m,0,GCD[d,zz]-1}]
]

Examples

MakeBoxes[label[n_,d_],TraditionalForm]:=RowBox[{RowBox[{RowBox[{"n","==",MakeBoxes[n,TraditionalForm]}],",",RowBox[{"d","==",MakeBoxes[d,TraditionalForm]}]}]}]

Show[GraphicsArray[Graphics[MaurerRose@@#,PlotLabel->TraditionalForm[label@@#],AspectRatio->Automatic]&/@{{4,120},{6,72}}]]