Cell[CellGroupData[{Cell[BoxData[ RowBox[{ RowBox[{"Rose", "[", RowBox[{"x_", ",", "theta_"}], "]"}], ":=", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"phi", "=", RowBox[{ RowBox[{"(", RowBox[{"Pi", "/", "2"}], ")"}], RowBox[{"Exp", "[", RowBox[{ RowBox[{"-", "theta"}], "/", RowBox[{"(", RowBox[{"8", " ", "Pi"}], ")"}]}], "]"}]}]}], ",", RowBox[{"X", "=", RowBox[{"1", "-", RowBox[{ RowBox[{"(", RowBox[{"1", "/", "2"}], ")"}], RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"5", "/", "4"}], ")"}], RowBox[{ RowBox[{"(", RowBox[{"1", "-", RowBox[{ RowBox[{"Mod", "[", RowBox[{ RowBox[{"3.6", " ", "theta"}], ",", RowBox[{"2", " ", "Pi"}]}], "]"}], "/", "Pi"}]}], ")"}], "^", "2"}]}], "-", RowBox[{"1", "/", "4"}]}], ")"}], "^", "2"}]}]}]}], ",", "y", ",", "r"}], "}"}], ",", RowBox[{ RowBox[{"y", "=", RowBox[{"1.95653", " ", RowBox[{"x", "^", "2"}], " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"1.27689", " ", "x"}], "-", "1"}], ")"}], "^", "2"}], " ", RowBox[{"Sin", "[", "phi", "]"}]}]}], ";", RowBox[{"r", "=", RowBox[{"X", RowBox[{"(", RowBox[{ RowBox[{"x", " ", RowBox[{"Sin", "[", "phi", "]"}]}], "+", RowBox[{"y", " ", RowBox[{"Cos", "[", "phi", "]"}]}]}], ")"}]}]}], ";", RowBox[{"{", RowBox[{ RowBox[{"r", " ", RowBox[{"Sin", "[", "theta", "]"}]}], ",", RowBox[{"r", " ", RowBox[{"Cos", "[", "theta", "]"}]}], ",", RowBox[{"X", RowBox[{"(", RowBox[{ RowBox[{"x", " ", RowBox[{"Cos", "[", "phi", "]"}]}], "-", RowBox[{"y", " ", RowBox[{"Sin", "[", "phi", "]"}]}]}], ")"}]}]}], "}"}]}]}], "]"}]}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, InitializationCell->True, CellChangeTimes->{3.760727784593314*^9}, CellID->445607969], Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"Evaluate", "@", RowBox[{"Rose", "[", RowBox[{"x", ",", "theta"}], "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", "0", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"theta", ",", RowBox[{ RowBox[{"-", "2"}], " ", "Pi"}], ",", "th"}], "}"}], ",", RowBox[{"Mesh", "->", "None"}], ",", RowBox[{"PerformanceGoal", "->", "\"\\""}], ",", RowBox[{"PlotPoints", "->", "100"}], ",", RowBox[{"PlotStyle", "->", RowBox[{"{", "clr", "}"}]}], ",", RowBox[{"ImageSize", "->", RowBox[{"{", RowBox[{"450", ",", "400"}], "}"}]}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1.6"}], ",", "1"}], "}"}]}], "}"}]}], ",", RowBox[{"Boxed", "->", "False"}], ",", RowBox[{"Axes", "->", "False"}]}], "]"}], ",", RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{"Green", ",", RowBox[{"Cylinder", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", ".05"}]}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "0", ",", RowBox[{"-", "10"}]}], "}"}]}], "}"}], ",", ".1"}], "]"}]}], "}"}], "]"}]}], "]"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"th", ",", RowBox[{"15", " ", "\[Pi]"}], ",", "\"\\""}], "}"}], ",", "\[Pi]", ",", RowBox[{"15", " ", "\[Pi]"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"clr", ",", "Red", ",", "\"\\""}], "}"}], ",", "Red"}], "}"}], ",", RowBox[{"SaveDefinitions", "->", "True"}]}], "]"}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{ 3.35696210375764*^9, 3.4106935378341184`*^9, { 3.4106935823028684`*^9, 3.4106935905841184`*^9}, { 3.4106939114591184`*^9, 3.410694063037243*^9}, { 3.410712797043598*^9, 3.4107128017154436`*^9}, 3.760727784584971*^9}], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`clr$$ = RGBColor[ 1, 0, 0], $CellContext`th$$ = 15 Pi, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`th$$], 15 Pi, "vary the petals"}, Pi, 15 Pi}, {{ Hold[$CellContext`clr$$], RGBColor[1, 0, 0], "color"}, RGBColor[1, 0, 0]}}, Typeset`size$$ = {450., {198., 202.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = False, $CellContext`th$921534$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`clr$$ = RGBColor[1, 0, 0], $CellContext`th$$ = 15 Pi}, "ControllerVariables" :> { Hold[$CellContext`th$$, $CellContext`th$921534$$, 0]}, "OtherVariables" :> { Typeset`show$$, Typeset`bookmarkList$$, Typeset`bookmarkMode$$, Typeset`animator$$, Typeset`animvar$$, Typeset`name$$, Typeset`specs$$, Typeset`size$$, Typeset`update$$, Typeset`initDone$$, Typeset`skipInitDone$$}, "Body" :> Show[ ParametricPlot3D[ Evaluate[ $CellContext`Rose[$CellContext`x, $CellContext`theta]], \ {$CellContext`x, 0, 1}, {$CellContext`theta, (-2) Pi, $CellContext`th$$}, Mesh -> None, PerformanceGoal -> "Speed", PlotPoints -> 100, PlotStyle -> {$CellContext`clr$$}, ImageSize -> {450, 400}, PlotRange -> {{-1, 1}, {-1, 1}, {-1.6, 1}}, Boxed -> False, Axes -> False], Graphics3D[{Green, Cylinder[{{0, 0, -0.05}, {0, 0, -10}}, 0.1]}]], "Specifications" :> {{{$CellContext`th$$, 15 Pi, "vary the petals"}, Pi, 15 Pi}, {{$CellContext`clr$$, RGBColor[1, 0, 0], "color"}, RGBColor[1, 0, 0]}}, "Options" :> {}, "DefaultOptions" :> {ControllerLinking -> True}], ImageSizeCache->{495., {260., 266.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, Initialization:>({$CellContext`Rose[ Pattern[$CellContext`x, Blank[]], Pattern[$CellContext`theta, Blank[]]] := Module[{$CellContext`phi = (Pi/2) Exp[-($CellContext`theta/(8 Pi))], $CellContext`X = 1 - (1/2) ((5/ 4) (1 - Mod[3.6 $CellContext`theta, 2 Pi]/Pi)^2 - 1/ 4)^2, $CellContext`y, $CellContext`r}, $CellContext`y = \ ((1.95653 $CellContext`x^2) (1.27689 $CellContext`x - 1)^2) Sin[$CellContext`phi]; $CellContext`r = $CellContext`X \ ($CellContext`x Sin[$CellContext`phi] + $CellContext`y Cos[$CellContext`phi]); {$CellContext`r Sin[$CellContext`theta], $CellContext`r Cos[$CellContext`theta], $CellContext`X ($CellContext`x Cos[$CellContext`phi] - $CellContext`y Sin[$CellContext`phi])}], Attributes[PlotRange] = {ReadProtected}}; Typeset`initDone$$ = True), SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{3.760727784585237*^9}, CellID->417501018] }, {3}]]