Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stars = AstronomicalData["StarNearest100"];
- pts = AstronomicalData[#, "Position"] & /@ stars;
- clrs = ColorData["BlackBodySpectrum"][
- AstronomicalData[#, "EffectiveTemperature"]] & /@ stars;
- clrs = Map[If[TrueQ[Head[#] == Blend], White, #] &, clrs];
- radii = AstronomicalData[#, "Radius"] & /@ stars;
- radii = Map[If[NumberQ[#], #, radii[[2]]] &, radii];
- frame[t_] := Module[{ptsn},
- ptsn = Map[
- RotationMatrix[4 Pi t, {0.1, 1, 1}].RotationMatrix[
- 2 Pi t, {1, 0, 0}].# &, pts];
- Graphics3D[{Sphere[{0, 0, 0}, 10^8],
- Table[{clrs[[i]],
- Sphere[ptsn[[i]], Tanh[radii[[i]]*2 (0.1^9)] 10 ^16]},
- {i, 100}]
- }, Background -> Black, Lighting -> {{"Ambient", White}},
- PlotRange -> Max[Map[Norm, pts]], ImageSize -> 300,
- ViewPoint -> {2, 0, 0}, Boxed -> False]
- ];
- Manipulate[frame[t],{t,0,1}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement