process:
- loops: used
for
loop to determine petalCount
times to draw petals in a circle around the flower's center
- translate: used
translate
function to place the flower at the center of the canvas
- conditionals & mapping: the size of the petals and color of the flower depend on the position of the mouse, with the
map()
function translating the mouseX
position into a usable size for the petals
- functions: code is broken down into the
drawFlower()
and drawPetal()
functions
difficulties
- wanted to use lerp() for more aesthetic and advanced code but could not figure out how to integrate it because color is based on pre-defined variables already
- that top petal is so ugly but idk what i can use to hide it
- using multiple push() and pop() functions within one another was kind of confusing
- getting into that stage where i’m starting to wonder how i can make this more interesting, interactive, and/or complex
https://editor.p5js.org/tinaaayu/sketches/rqTKlM0Dm