Section of the <a href="https://en.wikipedia.org/wiki/Earth" class="extiw" title="w:Earth">Earth</a>–<a href="https://en.wikipedia.org/wiki/Moon" class="extiw" title="w:Moon">Moon</a> system's trajectory around the Sun in proper scale.<br><p><span style="margin:0px; font-size:90%"><span style="border:1px solid #00289E; background-color:#6B90FF; color:#6B90FF">▇</span> orbital path of the Earth</span><br><span style="margin:0px; font-size:90%"><span style="border:1px solid #555; background-color:#ffffff; color:#ffffff">▇</span> orbital path of the Moon</span>
</p>
<div class="description mw-content-ltr es" dir="ltr" lang="es"><span class="language es" title="Spanish"><b>Español: </b></span> Un diagrama que ilustra la coórbita de la Luna con la Tierra.</div>
<dl><dt>Used parameters</dt></dl><p>import numpy as np
import matplotlib.pyplot as plt
rEM = 38 # SVG pixel per |Earth-Moon|; we're going to round to int.
rSE = rEM*389.168 # pixel per |Sun-Earth|
n = 10 # polygon segments per quarter month; with cubic splines, n = 1 would probably suffice.
p = 12.4 # synodic months per year; 4*n*p segments per year. 
θ = 2*np.pi*np.arange(-n-1, 3*n)/(4*n*p) # one month
xE = rSE*np.sin(θ)
yE =-rSE*np.cos(θ)
xM = rSE*np.sin(θ) + rEM*(np.sin(p*θ)*np.cos(θ) + np.cos(p*θ)*np.sin(θ)) # Rotate rM vector by Earth's arc angle.
yM =-rSE*np.cos(θ) - rEM*(np.cos(p*θ)*np.cos(θ) - np.sin(p*θ)*np.sin(θ))
fig, ax = plt.subplots(figsize=(19,2.5))
ax.plot(xE, yE, 'b-', linewidth=.5)
ax.plot(xM, yM, 'k-')
ax.plot(xE[1::n], yE[1::n], 'bo', markersize=5)
ax.plot(xM[1::n], yM[1::n], 'ko', markersize=2)
fig.tight_layout()
fig.show()
xE = xE.astype(int)
yE = yE.astype(int)
xM = xM.astype(int)
yM = yM.astype(int)
rM = 8; rE = 20 # radii, not to scale (would be 0.17 and 0.63)
open('out.svg', 'w').write(f<b>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</b>
&lt;svg xmlns="<a rel="nofollow" class="external free" href="http://www.w3.org/2000/svg">http://www.w3.org/2000/svg</a>" width="1600" height="{1600*(rSE+rEM+rM+yM[-1])/(xE[-1]-xE[0])}" viewBox="{xE[0]} {-(rSE+rEM+rM)} {xE[-1]-xE[0]} {rSE+rEM+rM+yM[-1]}"&gt;
&lt;defs&gt;
&lt;marker id="E" overflow="visible"&gt;&lt;circle r="{rE}" fill="blue"/&gt;&lt;/marker&gt;
&lt;marker id="M" overflow="visible"&gt;&lt;circle r="{rM}" fill="black"/&gt;&lt;/marker&gt;
&lt;/defs&gt;
&lt;path fill="none" stroke="blue"  stroke-width="2" d="M{'L'.join([x+' '+y for x,y in zip(xE.astype(str), yE.astype(str))])}"/&gt;
&lt;path fill="none" stroke="black" stroke-width="4" d="M{'L'.join([x+' '+y for x,y in zip(xM.astype(str), yM.astype(str))])}"/&gt;
&lt;path fill="none" stroke="none" marker-start="url(#M)" marker-mid="url(#M)" marker-end="url(#M)" d="M{'L'.join([x+' '+y for x,y in zip(xM[1::n].astype(str), yM[1::n].astype(str))])}"/&gt;
&lt;path fill="none" stroke="none" marker-start="url(#E)" marker-mid="url(#E)" marker-end="url(#E)" d="M{'L'.join([x+' '+y for x,y in zip(xE[1::n].astype(str), yE[1::n].astype(str))])}"/&gt;
&lt;/svg&gt;
</p>
<b>)</b>
<a href="https://de.wikipedia.org/wiki/User:Rainald62" class="extiw" title="de:User:Rainald62">de:User:Rainald62</a>
<span class="int-own-work" lang="en">Own work</span>