Programming with Processing 102-2 of 2

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
1,375
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 13, 2010

When programming a basic bouncing ball in Processing, at first it's best not to think of it as a "ball", but as a circle. The circle has a location (x,y), a radius, and a velocity (x,y). When the location and radius add up to a number greater than the size of your window, the velocity simply reverses. Here's a quick example.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (3)

Sign In or Sign Up now to post a comment!
  • @moonphoenix18 yep you right

  • thx for uploading! your video really helped a lot! I feel like I can understand this now.

    just one question: shouldn't it be "xPos - 30 < 0" instead "of xPos + 39 < 0" ?

  • Thanks for the videos. That's a pretty cool trick ^_^

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more