Strobe Ball — An Animation w/ Processing

Assignment #2 — Computational Media

For this week Processing exercise we played with animations. I decided to do a variation of the bouncing ball, available on Processing library. My idea was to make the ellipse get bigger and faster each time it bounced. Also, I wanted to create a strobe effect by alternating the colors black and white between the shape and the background. This how the final results look like:

The main milestones during the exercise were:

  1. Understanding the role of each variable on the equation that would set the position of the shape.
  2. The use of the function “if” to make the ellipse bouncing and change its speed and size.

At some point when the ball gets too big and too fast, I’ve encountered many problems, such as a position defined by NaN or infinite. Even after changing different parameters and playing with the variable “abs()”, I was not able to keep the strobe effect in looping as desired, and the ellipse eventually escapeded the canvas at some point.

10 stages of the strobe ball animation progress
Show your support

Clapping shows how much you appreciated Edson Soares’s story.