
For this week we needed to partner with someone from class and collaborate on code together. KC, Emmanuel and I were teamed up together. After thinking about it for a bit, we all decided to work on our code separately and help each other out as we went along.
I ended up just figuring out the translate, rotate and push/pop functions to make what is basically the face of a clock in the middle of the canvas (wish I had a WIP pic but forgot to take it, for next time).
Originally the plan was to make the my “clock” spin faster and faster as you clicked the mouse until the balls flew off and started bouncing around the screen.
Tried as I may, the “mousePressed” function just did not work for me. I watched the videos and tried to figure it out, but couldn’t do it. Instead, I decided to figure out the sliders we had talked about in class to add interactivity to my code. I created three sliders tied to the amount of “hands” of the screen, the size of the ellipse diameter and the rotation on the screen.
After working on that for a while, KC and I decided to merge our codes together, as it seemed they could both work together nicely. She had created four balls bouncing of the edges of the screen so we decided to limit the range for them and use them as a sort of frame for the clock. We also added a slider to control the color of the shapes bouncing of the edges.
Lastly, I tried to add a stripped background to make it more interesting by using the for loop but it kept freezing my sketch and crashing my computer (and not working). I wanted to do a nested loop but after having to restart my computer several times I decided to just leave it be.
I’d like to understand how to use the mousePressed function correctly as it wasn’t working for me, and to really break down nested loops… since they seem to be used so often.
