from visual import * from __future__ import division G = 6.7e-11 deltat = 100 numberOfSteps = 500 t = 0 Earth = sphere(pos = vector(0,0,0), radius = 6.4e6, color = color.blue) craft = sphere(pos = vector(-13e7,6.5e7,0), radius = 3e6,color = color.green) craft.m = 15e3 craft.p = craft.m*vector(3e3,0,0) Earth.m = 6e24 trail = curve(color = craft.color) while t < numberOfSteps*deltat: rate(100) r = # you need a vector that points from the Earth to the spacecraft rmag = mag(r) Fmag = #calculate the magnitude of gravitational force on the craft due to the Earth rhat = #what is the direction of the vector that points from the Earth toward the craft? Fnet = -Fmag*rhat craft.p = #update the craft's momentum craft.pos =#update the craft's position trail.append(pos = craft.pos) t = t+deltat