SHARE
TWEET

Pale Blue Dot

a guest Nov 24th, 2015 149 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cols = RGBColor /@ {"#2537b5", "#ff3804", "#ffffff", "#000000"};
  2.  
  3. a = 384748;
  4. rp = 362600;
  5. ra = 405400;
  6. e = (ra - rp)/(ra + rp);
  7. b = a Sqrt[1 - e^2];
  8. ea = 146600000;
  9. ee = .01671123;
  10. eb = ea Sqrt[1 - ee^2];
  11. er = 6371;
  12. mr = 1737;
  13. sr = 696342;
  14.  
  15. In[15]:= Manipulate[
  16.  Module[{earthOrbitScaleFactor, moonOrbitScaleFactor,
  17.    earthRadiusScaleFactor, moonRadiusScaleFactor},
  18.   earthOrbitScaleFactor = .05;
  19.   moonOrbitScaleFactor = 40;
  20.   earthRadiusScaleFactor = 40;
  21.   moonRadiusScaleFactor = 40;
  22.   Graphics[{cols[[2]], Disk[{0, 0}, sr], cols[[1]],
  23.     Disk[earthOrbitScaleFactor {eb Cos[\[Theta]], ea Sin[\[Theta]]},
  24.      earthRadiusScaleFactor*er], White,
  25.     Disk[earthOrbitScaleFactor {eb Cos[\[Theta]] +
  26.         moonOrbitScaleFactor *a Cos[13 \[Theta]],
  27.        ea Sin[\[Theta]] + moonOrbitScaleFactor*b Sin[13 \[Theta]]},
  28.      moonRadiusScaleFactor*mr]}, Background -> Black,
  29.    ImageSize -> {540, 540},
  30.    PlotRange -> 1.5 earthOrbitScaleFactor * ea]
  31.   ], {\[Theta], 0., 2 \[Pi]}]
  32.  
  33. Out[15]= Manipulate[Module[{earthOrbitScaleFactor$, \
  34. moonOrbitScaleFactor$,
  35.     earthRadiusScaleFactor$, moonRadiusScaleFactor$},
  36.    earthOrbitScaleFactor$ = 0.05; moonOrbitScaleFactor$ = 40;
  37.     earthRadiusScaleFactor$ = 40; moonRadiusScaleFactor$ = 40;
  38.     Graphics[{cols[[2]], Disk[{0, 0}, sr], cols[[1]],
  39.       Disk[earthOrbitScaleFactor$*{eb*Cos[\[Theta]], \
  40. ea*Sin[\[Theta]]},
  41.        earthRadiusScaleFactor$*er], White,
  42.       Disk[earthOrbitScaleFactor$*{eb*Cos[\[Theta]] + \
  43. moonOrbitScaleFactor$*a*
  44.            Cos[13*\[Theta]], ea*Sin[\[Theta]] + \
  45. moonOrbitScaleFactor$*b*Sin[13*\[Theta]]},
  46.        moonRadiusScaleFactor$*mr]}, Background -> Black,
  47.      ImageSize -> {540, 540}, PlotRange -> \
  48. 1.5*earthOrbitScaleFactor$*ea]],
  49.   {{\[Theta], 6.283185307179586}, 0., 2*Pi}]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top