Cell[CellGroupData[{Cell[BoxData[ RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"Show", "[", RowBox[{ RowBox[{"Graphics3D", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Specularity", "[", RowBox[{ RowBox[{"GrayLevel", "[", ".3", "]"}], ",", "1"}], "]"}], ",", RowBox[{"RGBColor", "[", RowBox[{".75", ",", ".7", ",", ".45"}], "]"}], ",", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"{", RowBox[{"0", ",", "0", ",", "0"}], "}"}], ",", "1"}], "]"}], ",", "White", ",", RowBox[{"PointSize", "[", ".001", "]"}], ",", RowBox[{"Point", "[", "stars", "]"}]}], "}"}], ",", RowBox[{"Method", "->", RowBox[{"{", RowBox[{"\"\\"", "->", "80"}], "}"}]}]}], "]"}], ",", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"Graphics3D", "[", RowBox[{"{", RowBox[{ RowBox[{"EdgeForm", "[", RowBox[{"GrayLevel", "[", ".3", "]"}], "]"}], ",", RowBox[{"Lighter", "[", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{".65", ",", ".6", ",", ".35"}], "]"}], ",", RowBox[{"Rescale", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], "+", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], ")"}], "/", "2"}], ",", RowBox[{"{", RowBox[{"1.24", ",", "2.30"}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"Specularity", "[", RowBox[{"White", ",", "128"}], "]"}], ",", RowBox[{"Ring", "[", RowBox[{ RowBox[{"#", "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"#", "[", RowBox[{"[", "2", "]"}], "]"}]}], "]"}]}], "}"}], "]"}], "&"}], ")"}], "/@", RowBox[{"Partition", "[", RowBox[{ RowBox[{"Drop", "[", RowBox[{ RowBox[{"Flatten", "[", RowBox[{"Nest", "[", RowBox[{ RowBox[{ RowBox[{"Flatten", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ "#1", "[[", "1", "]]"}], ",", RowBox[{ RowBox[{ "#1", "[[", "1", "]]"}], "+", RowBox[{ FractionBox["1", "3"], " ", RowBox[{"(", RowBox[{ RowBox[{ "#1", "[[", "2", "]]"}], "-", RowBox[{ "#1", "[[", "1", "]]"}]}], ")"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ "#1", "[[", "2", "]]"}], "-", RowBox[{ FractionBox["1", "3"], " ", RowBox[{"(", RowBox[{ RowBox[{ "#1", "[[", "2", "]]"}], "-", RowBox[{ "#1", "[[", "1", "]]"}]}], ")"}]}]}], ",", RowBox[{ "#1", "[[", "2", "]]"}]}], "}"}]}], "}"}], "&"}], ")"}], "/@", "#1"}], ",", "1"}], "]"}], "&"}], ",", RowBox[{"{", RowBox[{"{", RowBox[{"1.24", ",", "2.30"}], "}"}], "}"}], ",", "n"}], "]"}], "]"}], ",", "1"}], "]"}], ",", "2"}], "]"}]}], ",", RowBox[{"ImageSize", "->", RowBox[{"{", RowBox[{"500", ",", "380"}], "}"}]}], ",", RowBox[{"Background", "->", "Black"}], ",", RowBox[{"PlotRange", "->", "30"}], ",", RowBox[{"Lighting", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", RowBox[{"GrayLevel", "[", ".2", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"\"\\"", ",", "White", ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"-", "5"}], ",", "3"}], "}"}]}], "}"}]}], "}"}]}], ",", RowBox[{"SphericalRegion", "->", "True"}], ",", RowBox[{"ViewVector", "->", RowBox[{"Dynamic", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1.1", ",", "y", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1.5", ",", "0", ",", "0"}], "}"}]}], "}"}], ",", "None"}], "]"}]}], ",", RowBox[{"Boxed", "->", "False"}], ",", RowBox[{"ViewRange", "->", RowBox[{"{", RowBox[{".9", ",", "30"}], "}"}]}], ",", RowBox[{"ViewAngle", "->", RowBox[{"Pi", "/", "5"}]}]}], "]"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"n", ",", "4", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{"0", ",", "1", ",", "2", ",", "3", ",", "4", ",", "5"}], "}"}], ",", RowBox[{"ControlType", "->", "SetterBar"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "10"}], ",", "\"\\""}], "}"}], ",", RowBox[{"-", "10"}], ",", "10"}], "}"}], ",", RowBox[{"AutorunSequencing", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "10"}], "}"}]}], "}"}]}], ",", RowBox[{"Initialization", ":>", RowBox[{"{", RowBox[{ RowBox[{"SeedRandom", "[", "12345", "]"}], ";", RowBox[{"stars", "=", RowBox[{"20", " ", RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"Cos", "[", "#1", "]"}], RowBox[{"Sqrt", "[", RowBox[{"1", "-", RowBox[{"#2", "^", "2"}]}], "]"}]}], ",", RowBox[{ RowBox[{"Sin", "[", "#1", "]"}], RowBox[{"Sqrt", "[", RowBox[{"1", "-", RowBox[{"#2", "^", "2"}]}], "]"}]}], ",", "#2"}], "}"}], "&"}], "[", RowBox[{ RowBox[{"Random", "[", RowBox[{"Real", ",", RowBox[{"{", RowBox[{"0", ",", RowBox[{"2", "Pi"}]}], "}"}]}], "]"}], ",", RowBox[{"Random", "[", RowBox[{"Real", ",", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}]}], "]"}]}], "]"}], ",", RowBox[{"{", "5000", "}"}]}], "]"}]}]}], ";", RowBox[{ RowBox[{"Ring", "[", RowBox[{"rMin_", ",", "rMax_"}], "]"}], ":=", RowBox[{"Polygon", "[", RowBox[{"Join", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"rMin", " ", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "a", "]"}], ",", RowBox[{"Sin", "[", "a", "]"}], ",", "0"}], "}"}]}], ",", RowBox[{"{", RowBox[{"a", ",", "0", ",", RowBox[{"2", " ", "Pi"}], ",", RowBox[{"Pi", "/", "64"}]}], "}"}]}], "]"}], ",", RowBox[{"Table", "[", RowBox[{ RowBox[{"rMax", " ", RowBox[{"{", RowBox[{ RowBox[{"Cos", "[", "a", "]"}], ",", RowBox[{"Sin", "[", "a", "]"}], ",", "0"}], "}"}]}], ",", RowBox[{"{", RowBox[{"a", ",", "0", ",", RowBox[{"2", " ", "Pi"}], ",", RowBox[{"Pi", "/", "64"}]}], "}"}]}], "]"}]}], "]"}], "]"}]}]}], "}"}]}]}], "]"}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{ 3.35696210375764*^9, {3.371417454625*^9, 3.37141748503125*^9}, { 3.37141753253125*^9, 3.371417578140625*^9}, {3.371417624125*^9, 3.371417647453125*^9}, {3.37141770634375*^9, 3.3714177119375*^9}, { 3.371417949203125*^9, 3.3714180944375*^9}, {3.3714181308125*^9, 3.371418134828125*^9}, {3.3714181975*^9, 3.37141820103125*^9}, { 3.371418246609375*^9, 3.371418302125*^9}, {3.37141834759375*^9, 3.37141840621875*^9}, {3.371418535828125*^9, 3.371418535890625*^9}, {3.37141919559375*^9, 3.3714192749375*^9}, { 3.371419327015625*^9, 3.371419351734375*^9}, {3.3714194450625*^9, 3.371419477046875*^9}, {3.37141972175*^9, 3.37141976071875*^9}, { 3.37141981078125*^9, 3.37141988940625*^9}, {3.371419961859375*^9, 3.371420001625*^9}, {3.371420087125*^9, 3.3714201158125*^9}, { 3.37142014796875*^9, 3.3714201678125*^9}, {3.37142027959375*^9, 3.371420279984375*^9}, {3.371420410234375*^9, 3.371420428375*^9}, { 3.371421712890625*^9, 3.371421727203125*^9}, {3.37142312609375*^9, 3.371423175828125*^9}, {3.371423207515625*^9, 3.371423227125*^9}, { 3.371423307765625*^9, 3.371423377578125*^9}, {3.37142341609375*^9, 3.371423448984375*^9}, {3.371423688984375*^9, 3.371423738421875*^9}, {3.371423793453125*^9, 3.37142386715625*^9}, {3.371423908765625*^9, 3.371423911375*^9}, { 3.371423950125*^9, 3.37142398915625*^9}, {3.371424067390625*^9, 3.371424190171875*^9}, {3.3714252389375*^9, 3.371425239484375*^9}, {3.371606039015625*^9, 3.371606043296875*^9}, {3.371606074796875*^9, 3.371606078890625*^9}, 3.371606112171875*^9, {3.37160616253125*^9, 3.37160616515625*^9}, {3.372126492796875*^9, 3.372126554125*^9}, { 3.374671683296875*^9, 3.374671687515625*^9}, {3.374671824109375*^9, 3.374671900875*^9}, {3.374672051203125*^9, 3.37467206521875*^9}, { 3.374672342296875*^9, 3.374672357515625*^9}, {3.374673880734375*^9, 3.37467390109375*^9}, {3.380393491078125*^9, 3.380393516109375*^9}, 3.760793848643593*^9}, CellID->19958557], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`n$$ = 4, $CellContext`y$$ = -10, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{{ Hold[$CellContext`n$$], 4, "number of iterations"}, {0, 1, 2, 3, 4, 5}}, {{ Hold[$CellContext`y$$], -10, "fly by"}, -10, 10}}, Typeset`size$$ = {500., {188., 192.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = False, $CellContext`n$240$$ = 0, $CellContext`y$241$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`n$$ = 4, $CellContext`y$$ = -10}, "ControllerVariables" :> { Hold[$CellContext`n$$, $CellContext`n$240$$, 0], Hold[$CellContext`y$$, $CellContext`y$241$$, 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[ Graphics3D[{ Specularity[ GrayLevel[0.3], 1], RGBColor[0.75, 0.7, 0.45], Sphere[{0, 0, 0}, 1], White, PointSize[0.001], Point[$CellContext`stars]}, Method -> {"SpherePoints" -> 80}], Map[Graphics3D[{ EdgeForm[ GrayLevel[0.3]], Lighter[ RGBColor[0.65, 0.6, 0.35], Rescale[(Part[#, 1] + Part[#, 2])/2, {1.24, 2.3}]], Specularity[White, 128], $CellContext`Ring[ Part[#, 1], Part[#, 2]]}]& , Partition[ Drop[ Flatten[ Nest[Flatten[ Map[{{ Part[#, 1], Part[#, 1] + (1/3) (Part[#, 2] - Part[#, 1])}, { Part[#, 2] - (1/3) (Part[#, 2] - Part[#, 1]), Part[#, 2]}}& , #], 1]& , {{1.24, 2.3}}, $CellContext`n$$]], 1], 2]], ImageSize -> {500, 380}, Background -> Black, PlotRange -> 30, Lighting -> {{"Ambient", GrayLevel[0.2]}, {"Directional", White, {0, -5, 3}}}, SphericalRegion -> True, ViewVector -> Dynamic[{{1.1, $CellContext`y$$, 1}, {1.5, 0, 0}}, None], Boxed -> False, ViewRange -> {0.9, 30}, ViewAngle -> Pi/5], "Specifications" :> {{{$CellContext`n$$, 4, "number of iterations"}, {0, 1, 2, 3, 4, 5}, ControlType -> SetterBar}, {{$CellContext`y$$, -10, "fly by"}, -10, 10}}, "Options" :> {AutorunSequencing -> {{1, 4}, {2, 10}}}, "DefaultOptions" :> {ControllerLinking -> True}], ImageSizeCache->{545., {245., 251.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, Initialization:>({SeedRandom[12345]; $CellContext`stars = 20 Table[ ({Cos[#] Sqrt[1 - #2^2], Sin[#] Sqrt[1 - #2^2], #2}& )[ Random[Real, {0, 2 Pi}], Random[Real, {-1, 1}]], {5000}]; $CellContext`Ring[ Pattern[$CellContext`rMin, Blank[]], Pattern[$CellContext`rMax, Blank[]]] := Polygon[ Join[ Table[$CellContext`rMin { Cos[$CellContext`a], Sin[$CellContext`a], 0}, {$CellContext`a, 0, 2 Pi, Pi/ 64}], Table[$CellContext`rMax { Cos[$CellContext`a], Sin[$CellContext`a], 0}, {$CellContext`a, 0, 2 Pi, Pi/ 64}]]]}; 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.76079384864402*^9}, CellID->279978514] }, {2}]]