
100 nearest stars
By:
Matthen on Jan 19th, 2012 | syntax:
None | size: 0.83 KB | hits: 250 | expires: Never
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}]