Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Manipulate[
- If[t < 1/3,
- zoom = 4000 + 250000 ((3 t)^2);
- centrepoint = {-EarthMoonDistance, 0};
- labels = {Text[
- Style["The Moon",
- FontSize -> Max[16 (1 - 5 t), 0]], {-EarthMoonDistance, 0}]};
- ];
- If[1/3 <= t < 2/3,
- zoom = 254000;
- centrepoint = {-EarthMoonDistance, 0} (1 - 3 (t - 1/3)) +
- 3 (t - 1/3) {-EarthRadius - ISSHeight, 0};
- labels = {Lighter@Red, Arrowheads[{-.05, .05}],
- Arrow[{{-EarthMoonDistance + MoonRadius, 0}, {-EarthRadius, 0}}],
- Text[Style["Apollo Missions",
- FontSize -> 15], {-EarthMoonDistance, 12000}/2]
- };
- ];
- If[2/3 <= t < 1,
- centrepoint = {-EarthRadius - ISSHeight, 0};
- zoom = 254000 - 3 (t - 2/3) (254000 - ISSHeight - 1500);
- labels = {
- Opacity[Max[0, 1 - 4 (t - 2/3)]],
- Arrowheads[{-.05, .05}], Lighter@Red,
- Arrow[{{-EarthMoonDistance + MoonRadius, 0}, {-EarthRadius, 0}}],
- Text[Style["Apollo Missions",
- FontSize -> 15], {-EarthMoonDistance, 12000}/2]
- };
- ];
- If[t >= 1,
- zoom = ISSHeight - 1500;
- labels = {
- Opacity[Max[0, 3 (t - 1)]],
- Lighter@Blue,
- Text[Style["International\nSpace Station",
- FontSize -> 14], {-EarthRadius - ISSHeight - 150, 200}]}
- ];
- (* in miles *)
- EarthRadius = 3960;
- EarthMoonDistance = 245120;
- MoonRadius = 1080;
- MesosphereTop = 53;
- ISSHeight = 250;
- Graphics[{
- (* the atmosphere*)
- RGBColor[0.4, 0.8, 0.9],
- Disk[{0, 0}, MesosphereTop + EarthRadius],
- (* the Earth*)
- RGBColor[0, 0.2, 0.9],
- Disk[{0, 0}, EarthRadius],
- (* the Moon *),
- White,
- Disk[{-EarthMoonDistance, 0}, MoonRadius],
- (* the ISS*),
- White,
- Disk[{-EarthRadius - ISSHeight, 0}, 10],
- Black,
- labels
- }, Background -> Black,
- PlotRange -> {centrepoint[[1]] + {-1, 1} zoom,
- centrepoint[[2]] + {-1, 1} zoom}, ImageSize -> 300],
- {t, 0, 4/3}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement