%% Given the ball positions and velocities, computes the time to complete the time period before another state of ball positions and velocities.