Week 2-Interactive Assignment (Caleb and SangDoo)

For the interactive assignment, SangDoo and I created a helicopter (squares and rectangles) spinning around the mouse, while following the mouse. When you hold the mouse button, the helicopter flies off into the sky. Once you release the mouse button, the helicopter comes back to the mouse.

One of the hardest parts of the code was having the helicopter spin around the location of the mouse. We didn’t want to have the helicopter perfectly connected to the mouse, so we created an ease variable. The translate and rotate functions are sometimes confusing to use, but we were successful in having the helicopter spin around the location of the mouse, with an ease.

The color of the stroke of the helicopter also changes depending on the location of the mouse.

Another difficulty came when we tried to change the background color once the mouse was clicked. We didn’t want the helicopter to have a trail of color behind its movement, so we created a variable called “color” to put into the first input for the background function. We were able to randomize this variable later in the mousePressed function, and everything ended up working nicely.

https://www.openprocessing.org/sketch/506233