In this chapter, we cover
Maintaining a list of objects to draw on the screen
Rotating objects drawn on the screen
Mouse drag and drop operations
Calculations to simulate ballistic motion (effects of gravity) and collisions
Introduction
This chapter demonstrates another example of animation, in this case simulation of ballistics
, also called projectile motion. A ball or ball-like object maintains a constant horizontal (x) displacement, with the vertical displacement changing as it would due to gravity. The resulting motion is an arc. The ball stops when it (virtually) hits the ground ...