Documented by: Candy Bi
Project name: Protect the bouncing ball
Professor: Moon
Date: 2/26/2019
I want to create several bouncing balls that would be somewhat controlled by user through mouse interaction in the way that those balls seems physically exist.
To do so, I first create several balls from the class and then I add lines that connect the balls with mouse position using the line function.
Then I add the number of the time those balls hit the boundary as well as the force of mouse through mapping the position of mouseX and mouseY.
However the time keeps adding and seems a little boring. I want them to be deleted when the number add on to ten yet do not know how. I then add the text of “dead” to the ball instead of number of hits on the ball when its lifespan ended.
I am not quite satisfied with what I have now. I suddenly came up with the idea of making the color of the ball white to fake its disppear. It turns out good.
Some further improvements may be more natural effect of balls hitting the boundary and balls disappear gradually.