Recitation 7: Processing Animation by Tristan Murdoch

In this recitation, we explored further the capabilities of processing. In previous classes, we had made simple shapes and learned to randomize colors, or make them move around the screen either by using the mouse or by preprogramming the shapes to do so. Instead of animating Recitation 6’s project, I chose to do something new. 

The idea was to make a circle follow the mouse and change to a random color when it hits the edge of the screen (only for the x). Although very much useless, it seemed challenging and plausible.  Below are the video and code:

This was my first experience using boolean, which we had studied but never actually used. Leon helped me fix an issue where only the right side of the screen would prompt a the color change. 

Homework Part:

I found this not to be exceedingly difficult until the last (optional) step of confounding the circle to the screen. I managed to do it when the circle was not expanding and contracting, but not during. The video and code are below:

Using colorMode(HSB); to change the color of the circle was interesting. On the first attempt, the circle contracted and then expanded infinitely, until I remembered I needed to specify an outer boundary as well. This also helped me differentiate between the “if” and “for” functions, which I was rather confused about.

Leave a Reply