File:37 leapfrog.jpeg

With the leapfrog algorithm, when we update a position value to a new point in time, we use the information from the velocity value in between the old and the new point in time. This is indicated by the vertical downwardarrows. Similarly, when we update a velocity value to a new point in time, we use the information from the acceleration value in between the old and the new point in time. Each acceleration value is computed directly from the position value, using Newton's law of gravity. This is indicated with the dashed upward pointing arrows.