Cell[CellGroupData[{Cell[BoxData[ RowBox[{"Manipulate", "[", " ", RowBox[{ RowBox[{ RowBox[{"SeedRandom", "[", "seed", "]"}], ";", " ", RowBox[{"tinystars", "=", " ", 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[{"RandomReal", "[", RowBox[{"{", RowBox[{"0", ",", RowBox[{"2", "Pi"}]}], "}"}], "]"}], ",", RowBox[{"RandomReal", "[", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}], "]"}]}], "]"}], ",", RowBox[{"{", "n1", "}"}]}], "]"}]}]}], ";", " ", RowBox[{"smallstars", "=", " ", RowBox[{"5", " ", 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[{"RandomReal", "[", RowBox[{"{", RowBox[{"0", ",", RowBox[{"2", "Pi"}]}], "}"}], "]"}], ",", RowBox[{"RandomReal", "[", RowBox[{"{", RowBox[{ RowBox[{"-", "1"}], ",", "1"}], "}"}], "]"}]}], "]"}], ",", RowBox[{"{", "n2", "}"}]}], "]"}]}]}], ";", " ", RowBox[{"mediumstars", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"Append", "[", RowBox[{ RowBox[{"RandomReal", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", RowBox[{"{", "2", "}"}]}], "]"}], ",", RowBox[{"RandomReal", "[", RowBox[{"{", RowBox[{ RowBox[{"-", "10"}], ",", "10"}], "}"}], "]"}]}], "]"}], ",", RowBox[{"RandomReal", "[", "0.02", "]"}]}], "]"}], "}"}], ",", RowBox[{"{", "n3", "}"}]}], "]"}]}], ";", " ", RowBox[{"bigstars", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"Append", "[", RowBox[{ RowBox[{"RandomReal", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "0.5"}], ",", "0.5"}], "}"}], ",", RowBox[{"{", "2", "}"}]}], "]"}], ",", RowBox[{"RandomReal", "[", RowBox[{"{", RowBox[{ RowBox[{"-", "10"}], ",", "10"}], "}"}], "]"}]}], "]"}], ",", RowBox[{"RandomReal", "[", "0.05", "]"}]}], "]"}], "}"}], ",", RowBox[{"{", "n4", "}"}]}], "]"}]}], ";", " ", RowBox[{"largestars", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"Sphere", "[", RowBox[{ RowBox[{"Append", "[", RowBox[{ RowBox[{"RandomReal", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "0.25"}], ",", "0.25"}], "}"}], ",", RowBox[{"{", "2", "}"}]}], "]"}], ",", RowBox[{"RandomReal", "[", RowBox[{"{", RowBox[{ RowBox[{"-", "10"}], ",", "10"}], "}"}], "]"}]}], "]"}], ",", RowBox[{"RandomReal", "[", "0.1", "]"}]}], "]"}], "}"}], ",", RowBox[{"{", "n5", "}"}]}], "]"}]}], ";", " ", RowBox[{"Graphics3D", "[", RowBox[{ RowBox[{"{", " ", RowBox[{"White", ",", RowBox[{"PointSize", "[", "0.001", "]"}], ",", RowBox[{"Point", "[", "tinystars", "]"}], ",", " ", "White", ",", RowBox[{"PointSize", "[", "0.002", "]"}], ",", RowBox[{"Point", "[", "smallstars", "]"}], ",", " ", "Yellow", ",", "mediumstars", ",", " ", "Brown", ",", "bigstars", ",", " ", "Orange", ",", "largestars"}], "}"}], ",", " ", RowBox[{"Background", "->", "Black"}], ",", RowBox[{"Boxed", "->", "False"}], ",", RowBox[{"SphericalRegion", "->", "True"}], ",", RowBox[{"ImageSize", "->", RowBox[{"{", RowBox[{"450", ",", "400"}], "}"}]}], ",", RowBox[{"Lighting", "->", "Automatic"}], ",", RowBox[{"ViewVector", "->", RowBox[{"{", RowBox[{"0", ",", "0", ",", "time"}], "}"}]}], ",", RowBox[{"ViewAngle", "->", RowBox[{"45", "Degree"}]}]}], "]"}]}], ",", " ", RowBox[{"Style", "[", RowBox[{"\"\\"", ",", "Bold"}], "]"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"n1", ",", "1000", ",", "\"\\""}], "}"}], ",", "1000", ",", "2000", ",", "1", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"ControlPlacement", "->", "Left"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"n2", ",", "100", ",", "\"\\""}], "}"}], ",", "100", ",", "200", ",", "1", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"ControlPlacement", "->", "Left"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"n3", ",", "20", ",", "\"\\""}], "}"}], ",", "20", ",", "50", ",", "1", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"ControlPlacement", "->", "Left"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"n4", ",", "10", ",", "\"\\""}], "}"}], ",", "10", ",", "20", ",", "1", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"ControlPlacement", "->", "Left"}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"n5", ",", "5", ",", "\"\\""}], "}"}], ",", "5", ",", "10", ",", "1", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"ControlPlacement", "->", "Left"}]}], "}"}], ",", " ", "Delimiter", ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"seed", ",", "1234", ",", "\"\\""}], "}"}], ",", "12", ",", "12345", ",", "1", ",", RowBox[{"ImageSize", "->", "Tiny"}], ",", RowBox[{"ControlPlacement", "->", "Left"}]}], "}"}], ",", " ", "Delimiter", ",", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"time", ",", RowBox[{"-", "10"}], ",", "\"\\""}], "}"}], ",", RowBox[{"-", "10"}], ",", RowBox[{"-", "1"}], ",", "0.001", ",", RowBox[{"ControlType", "->", "Trigger"}], ",", RowBox[{"AnimationRate", "->", "0.5"}], ",", RowBox[{"ControlPlacement", "->", "Left"}]}], "}"}], ",", " ", RowBox[{"ControlPlacement", "->", "Left"}], ",", RowBox[{"TrackedSymbols", "->", "Manipulate"}], ",", RowBox[{"AutorunSequencing", "->", RowBox[{"{", "7", "}"}]}]}], "]"}]], "Input", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{ 3.35696210375764*^9, 3.434419811609375*^9, {3.434420108125*^9, 3.434420145265625*^9}, 3.434420227109375*^9, {3.4344204458125*^9, 3.434420676796875*^9}, {3.43442071359375*^9, 3.43442089184375*^9}, {3.434420940859375*^9, 3.434420976875*^9}, { 3.43442102146875*^9, 3.434421039515625*^9}, 3.434421103625*^9, { 3.43442114315625*^9, 3.4344211460625*^9}, {3.434421209890625*^9, 3.43442122528125*^9}, {3.434421257015625*^9, 3.4344213659375*^9}, { 3.434421398*^9, 3.434421453578125*^9}, {3.434421523828125*^9, 3.434421526109375*^9}, 3.434421591203125*^9, {3.43442245425*^9, 3.43442245459375*^9}, {3.43442254290625*^9, 3.434422545546875*^9}, {3.43442272403125*^9, 3.434422725390625*^9}, {3.434422761921875*^9, 3.4344227825625*^9}, {3.4344229378125*^9, 3.434423015984375*^9}, { 3.434423047671875*^9, 3.434423071625*^9}, 3.434423117578125*^9, { 3.4344725701994867`*^9, 3.434472570702537*^9}, { 3.4344726246039267`*^9, 3.434472644901956*^9}, { 3.434899183428907*^9, 3.434899192022602*^9}, 3.759770627453188*^9}, CellID->54058564], Cell[BoxData[ TagBox[ StyleBox[ DynamicModuleBox[{$CellContext`n1$$ = 1000, $CellContext`n2$$ = 100, $CellContext`n3$$ = 20, $CellContext`n4$$ = 10, $CellContext`n5$$ = 5, $CellContext`seed$$ = 1234, $CellContext`time$$ = -10, Typeset`show$$ = True, Typeset`bookmarkList$$ = {}, Typeset`bookmarkMode$$ = "Menu", Typeset`animator$$, Typeset`animvar$$ = 1, Typeset`name$$ = "\"untitled\"", Typeset`specs$$ = {{ Hold[ Style["number of stars", Bold]], Manipulate`Dump`ThisIsNotAControl}, {{ Hold[$CellContext`n1$$], 1000, "tiny"}, 1000, 2000, 1}, {{ Hold[$CellContext`n2$$], 100, "small"}, 100, 200, 1}, {{ Hold[$CellContext`n3$$], 20, "medium"}, 20, 50, 1}, {{ Hold[$CellContext`n4$$], 10, "big"}, 10, 20, 1}, {{ Hold[$CellContext`n5$$], 5, "very big"}, 5, 10, 1}, {{ Hold[$CellContext`seed$$], 1234, "seed"}, 12, 12345, 1}, {{ Hold[$CellContext`time$$], -10, "time"}, -10, -1, 0.001}}, Typeset`size$$ = {450., {198., 202.}}, Typeset`update$$ = 0, Typeset`initDone$$, Typeset`skipInitDone$$ = True, $CellContext`n1$153598$$ = 0, $CellContext`n2$153599$$ = 0, $CellContext`n3$153600$$ = 0, $CellContext`n4$153601$$ = 0, $CellContext`n5$153602$$ = 0, $CellContext`seed$153603$$ = 0, $CellContext`time$153604$$ = 0}, DynamicBox[Manipulate`ManipulateBoxes[ 1, StandardForm, "Variables" :> {$CellContext`n1$$ = 1000, $CellContext`n2$$ = 100, $CellContext`n3$$ = 20, $CellContext`n4$$ = 10, $CellContext`n5$$ = 5, $CellContext`seed$$ = 1234, $CellContext`time$$ = -10}, "ControllerVariables" :> { Hold[$CellContext`n1$$, $CellContext`n1$153598$$, 0], Hold[$CellContext`n2$$, $CellContext`n2$153599$$, 0], Hold[$CellContext`n3$$, $CellContext`n3$153600$$, 0], Hold[$CellContext`n4$$, $CellContext`n4$153601$$, 0], Hold[$CellContext`n5$$, $CellContext`n5$153602$$, 0], Hold[$CellContext`seed$$, $CellContext`seed$153603$$, 0], Hold[$CellContext`time$$, $CellContext`time$153604$$, 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" :> ( SeedRandom[$CellContext`seed$$]; $CellContext`tinystars = 20 Table[ ({Cos[#] Sqrt[1 - #2^2], Sin[#] Sqrt[1 - #2^2], #2}& )[ RandomReal[{0, 2 Pi}], RandomReal[{-1, 1}]], {$CellContext`n1$$}]; $CellContext`smallstars = 5 Table[ ({Cos[#] Sqrt[1 - #2^2], Sin[#] Sqrt[1 - #2^2], #2}& )[ RandomReal[{0, 2 Pi}], RandomReal[{-1, 1}]], {$CellContext`n2$$}]; $CellContext`mediumstars = Table[{ Sphere[ Append[ RandomReal[{-2, 2}, {2}], RandomReal[{-10, 10}]], RandomReal[ 0.02]]}, {$CellContext`n3$$}]; $CellContext`bigstars = Table[{ Sphere[ Append[ RandomReal[{-0.5, 0.5}, {2}], RandomReal[{-10, 10}]], RandomReal[ 0.05]]}, {$CellContext`n4$$}]; $CellContext`largestars = Table[{ Sphere[ Append[ RandomReal[{-0.25, 0.25}, {2}], RandomReal[{-10, 10}]], RandomReal[0.1]]}, {$CellContext`n5$$}]; Graphics3D[{White, PointSize[0.001], Point[$CellContext`tinystars], White, PointSize[0.002], Point[$CellContext`smallstars], Yellow, $CellContext`mediumstars, Brown, $CellContext`bigstars, Orange, $CellContext`largestars}, Background -> Black, Boxed -> False, SphericalRegion -> True, ImageSize -> {450, 400}, Lighting -> Automatic, ViewVector -> {0, 0, $CellContext`time$$}, ViewAngle -> 45 Degree]), "Specifications" :> { Style[ "number of stars", Bold], {{$CellContext`n1$$, 1000, "tiny"}, 1000, 2000, 1, ImageSize -> Tiny, ControlPlacement -> Left}, {{$CellContext`n2$$, 100, "small"}, 100, 200, 1, ImageSize -> Tiny, ControlPlacement -> Left}, {{$CellContext`n3$$, 20, "medium"}, 20, 50, 1, ImageSize -> Tiny, ControlPlacement -> Left}, {{$CellContext`n4$$, 10, "big"}, 10, 20, 1, ImageSize -> Tiny, ControlPlacement -> Left}, {{$CellContext`n5$$, 5, "very big"}, 5, 10, 1, ImageSize -> Tiny, ControlPlacement -> Left}, Delimiter, {{$CellContext`seed$$, 1234, "seed"}, 12, 12345, 1, ImageSize -> Tiny, ControlPlacement -> Left}, Delimiter, {{$CellContext`time$$, -10, "time"}, -10, -1, 0.001, ControlType -> Trigger, AnimationRate -> 0.5, ControlPlacement -> Left}}, "Options" :> { ControlPlacement -> Left, TrackedSymbols -> Manipulate, AutorunSequencing -> {7}}, "DefaultOptions" :> {ControllerLinking -> True}], ImageSizeCache->{618., {227., 233.}}, SingleEvaluation->True], Deinitialization:>None, DynamicModuleValues:>{}, SynchronousInitialization->True, UnsavedVariables:>{Typeset`initDone$$}, UntrackedVariables:>{Typeset`size$$}], "Manipulate", Deployed->True, StripOnInput->False], Manipulate`InterpretManipulate[1]]], "Output", CellGroupingRules->{"GroupTogetherGrouping", 10000.}, CellChangeTimes->{3.759770627453582*^9}, CellID->22062556] }, {2}]]