Advertisement
Matthen

Scale of Human Spaceflight

Aug 13th, 2011
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. Manipulate[
  2. If[t < 1/3,
  3. zoom = 4000 + 250000 ((3 t)^2);
  4. centrepoint = {-EarthMoonDistance, 0};
  5. labels = {Text[
  6. Style["The Moon",
  7. FontSize -> Max[16 (1 - 5 t), 0]], {-EarthMoonDistance, 0}]};
  8. ];
  9. If[1/3 <= t < 2/3,
  10. zoom = 254000;
  11. centrepoint = {-EarthMoonDistance, 0} (1 - 3 (t - 1/3)) +
  12. 3 (t - 1/3) {-EarthRadius - ISSHeight, 0};
  13. labels = {Lighter@Red, Arrowheads[{-.05, .05}],
  14. Arrow[{{-EarthMoonDistance + MoonRadius, 0}, {-EarthRadius, 0}}],
  15. Text[Style["Apollo Missions",
  16. FontSize -> 15], {-EarthMoonDistance, 12000}/2]
  17. };
  18. ];
  19. If[2/3 <= t < 1,
  20. centrepoint = {-EarthRadius - ISSHeight, 0};
  21. zoom = 254000 - 3 (t - 2/3) (254000 - ISSHeight - 1500);
  22. labels = {
  23. Opacity[Max[0, 1 - 4 (t - 2/3)]],
  24. Arrowheads[{-.05, .05}], Lighter@Red,
  25. Arrow[{{-EarthMoonDistance + MoonRadius, 0}, {-EarthRadius, 0}}],
  26. Text[Style["Apollo Missions",
  27. FontSize -> 15], {-EarthMoonDistance, 12000}/2]
  28. };
  29. ];
  30. If[t >= 1,
  31. zoom = ISSHeight - 1500;
  32. labels = {
  33. Opacity[Max[0, 3 (t - 1)]],
  34. Lighter@Blue,
  35. Text[Style["International\nSpace Station",
  36. FontSize -> 14], {-EarthRadius - ISSHeight - 150, 200}]}
  37. ];
  38.  
  39. (* in miles *)
  40. EarthRadius = 3960;
  41. EarthMoonDistance = 245120;
  42. MoonRadius = 1080;
  43. MesosphereTop = 53;
  44. ISSHeight = 250;
  45.  
  46. Graphics[{
  47. (* the atmosphere*)
  48. RGBColor[0.4, 0.8, 0.9],
  49. Disk[{0, 0}, MesosphereTop + EarthRadius],
  50. (* the Earth*)
  51. RGBColor[0, 0.2, 0.9],
  52. Disk[{0, 0}, EarthRadius],
  53. (* the Moon *),
  54. White,
  55. Disk[{-EarthMoonDistance, 0}, MoonRadius],
  56. (* the ISS*),
  57. White,
  58. Disk[{-EarthRadius - ISSHeight, 0}, 10],
  59. Black,
  60. labels
  61. }, Background -> Black,
  62. PlotRange -> {centrepoint[[1]] + {-1, 1} zoom,
  63. centrepoint[[2]] + {-1, 1} zoom}, ImageSize -> 300],
  64. {t, 0, 4/3}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement