Graphics Reference
In-Depth Information
(1)
display a rectangular “table” with a single solid colored ball at some initial position
(2)
show a cue stick (represented as a long, thin rectangular object) hitting the ball at
various angles specified by the user
(3)
show the movement of the ball after it is hit as it bounces from wall to wall
(4)
have the balls slow down and finally come to a halt to make things look somewhat
realistic
Experiment with different animation techniques on your own, such as double buffering. Hand
in the one that you think gives the best results. Be sure to explain why it was chosen over other
approaches.
Optionally, have one or more other balls on the table and
(5)
if a moving ball hits another one, then it should come to a stop and the other one
should move in the appropriate direction with the first one's velocity (if a ball hits k
> 1 balls with velocity v, then they should start with velocity v/k)
Your program should have suitable menus and output explanations as to what is happening.
Search WWH ::




Custom Search