Texts: Box 3: Making things move
How do the lines of the Python code
earth.p = earth.p + force * dt
and
earth.pos = earth.pos + (earth.p / earth.M) * dt
relate to the physics equations in the "Determining the motion of a particle" section?
Box 4: Making things move
Explain the relationship between the Python code
force = -G * sun.M * earth.M * R / magR ** 3
and the equation
F = G * ms * me * RE / R^2
Hint: Starting with the vector R, how can we find the unit vector R which points in the direction of R?
Remember that in Python we use ** for exponentiation, so magR ** 3 means (magR)^3.