https://editor.p5js.org/saramui/sketches/L07uTioyL
My first step for this mini project was to make the creature. I was inspired by the character Pompompurin and decided to draw him with various ellipses. I initially had trouble with the rotations for his ears and arms, but after changing ellipse more from CORNER to CENTER, things became much easier,However, it was after I finished drawing him that I realized that with the functions and coordinates I used, he would not be able to move. I then redefined that origin of the canvas and rewrote all the coordinates in terms of x and y with respect to the new origin. I then experimented with the function that would make him walk, which was essentially moving him up and down a sine wave very quickly. I translated him to outside of the canvas and made him loop back around and continue walking through the screen. I also added some clouds to make the scene look more interesting.
I used translate() when I wanted to draw something in reference to something else, like all of Pom’s body parts. I used push() and pop() to separate all of his individual body parts so none of them would overlap and affect each other. A user-defined function made it easy for me to see and understand my code, because I had sectioned off each part and was able to refer to my codes very conveniently.
Leave a Reply