process:

  1. loops: used for loop to determine petalCount times to draw petals in a circle around the flower's center
  2. translate: used translate function to place the flower at the center of the canvas
  3. 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
  4. functions: code is broken down into the drawFlower() and drawPetal() functions

difficulties

https://editor.p5js.org/tinaaayu/sketches/rqTKlM0Dm