@@ -0,0 +1,857 @@
+from vpython import *%0Afrom vpython.graph import *%0Afrom color import *%0A%0Ascene = display(width=600, height=600, center=(0, 5, 0))%0A%0ASun = sphere(pos=vector(0,0,0), radius=100, color=color.orange)%0Aearth = sphere(pos=vector(-200,0,0), radius=10,%0A               make_trail=True)%0A%0Aearthv = vector(0, 0, 6)%0A%0Agd = gdiplay(x=800, y=0, width=600, height=600,%0A             ##foreground=color.blaco, background=color.white,%0A            ## xmax=3000, xmin=0, ymax=500, ymin=0)%0Af1 = gcurve(color=color.red)%0At = 0%0A%0Afor i in range(1000):%0A    rate(100)%0A    earth.pos = earth.pos + earthv%0A    dist = (earth.x ** 2 + earth.y ** 2 + earth.z ** 2) ** 0.5%0A    RadialVector = (earth.pos - Sun.pos) / dist%0A    Fgrav = -10000 * RadialVector / dist ** 2%0A    earthv = earthv + Fgrav%0A    earth.pos += earthv%0A    f1.plot(pos=(t, mag(earhv)))%0A    t += 1%0A%0A    if dist %3C= Sun.radius: break%0A

Create vpython_example.py