Skip to content

qijiepan/LifeProblem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LifeProblem

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.

How to run this code.

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.

the code part of polygon is come from processing.org.https://processing.org/examples/regularpolygon.html

the code part of mover() is come from the book "the nature of code"

About

CS582

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published