https://github.com/ITPNYU/ICM-2024-Code/wiki/Homework-Dave-02
https://editor.p5js.org/Siming2024/sketches/hd-hzFfiZ
My plan is to
-
rewrite the folding fan and pine tree I made in the past few weeks using objects.
-
Play with it and add a simple interaction.

I added loops to make the pine trees cover the background and to toggle the background color change with the fan's unfolding movement.

Process breakdown:
- Create two objects: "folding fan" and "pine tree." For the "fan leaf," I still use a self-defined function borrowed from last week's homework (this.drawFanLeaf())
- In the "folding fan" object, use two push()/pop() pairs and a loop to ensure the fan leaves rotate from the center (this.x, this.y) without affecting other parts of the code, such as the pine tree's position.
- Add a condition to position the fan in the center of the canvas.
- Add a loop to draw multiple pine trees to cover the canvas.
- Use variables for colors.
- Interaction 1: Map the folding fan to mouse movement.