Processing Lab

Our processing sketch contains balls which can move around the workspace. The space is initially set to contain only one ball, although the user can use the “n” key to add more. If left alone, the balls will simply bounce up and down, but they can also be “picked up” with the mouse and moved around the screen, or thrown to change their directions. The balls stay contained within the limits of the screen; bouncing off the sides when they hit it. They also bounce off of each other if they hit each other. 


This entry was posted in Uncategorized. Bookmark the permalink.

1 Response to Processing Lab

  1. cyberprofgus says:

    It would be an interesting exercise to use smaller circles and generate many (100’s to 1000’s) of new ones. Your code’s time per step will scale as N*N (N-squared), so the you should see a slowdown of a factor of 10,000 in going from N=10 to N=1000.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s