https://editor.p5js.org/n30w/sketches/DnVL5aOg1
For this project, I created a little animal-like figure that dances and has little circles that move atop its head.
The code for this project is pretty simple, as the logic behind how the character should be created was documented in the instructions for this assignment.
Due to the existence of an update function and a draw function, I decided to segment my code into two different types of functions: ones that update and ones that draw. The update functions are not void functions so they return a value and are used to update variables in the update function of the entire class. The draw functions just display elements onto the screen based on the variables that the update function updates. For example, the movement of the body is updated via the function rotateBody, and is displayed through drawBody. The rotateBody just outputs a rotation factor based on the simple expression 0.08 * sin(frameCount/15), and this rotation factor is then passed to the rotateBody function which it uses to rotate the body of the character using the P5 rotate function.
I did not find many difficulties in this assignment, as I have experience working with object oriented programming. The syntax and execution of what I wanted was nearly seamless, except for the fact that I have trouble visualizing in my head how to position certain things on the canvas. I cannot just move things with my hand like Photoshop, but instead move things with instructions for the computer, which is a little difficult to conceptualize since it is an abstraction of what one could do intuitively with their hands.











