Simple physics simulation of curvilinear and rectilinear motions