this processing document describe two person play ping-pong(but the ball is not a circle, but a green Quadrilateral). And there are two black lines stand for the border of table of ping-pong. The two blue points represent two experts who can get the ball in any place and kick it back. And one interesting point is you can use mouse to accelerate the speed of the green Quadrilateral. so it means you can control the speed of "ball". but the top speed is 5.which is a limitation. And when the "ball" meet the border of table, the top side and down side, it will change the direction in Y. as it is catched by the expert, it will also be kicked back and change the direction in x.
This code is based on Java. and it includes three files. Assignment 0, Mover and Polygon. The Assignment0 is the main file. which include the main and draw. The Polygon is the file to draw a polygon, based on different parameters. The Mover is the file to draw the "ball" and the expert.