Project 3 Experimental Clock - Happy Sunflower

Description

Happy sunflower is not happy when the sun moves away.

Design Process

I draw a couple of sketches to define the location of the sunflower and also the maximum/minimum changes on her mouth. It takes me some time to figure out the PI representation.

The hardest part of this project is the condition, and how I am going to combine it with second(). I actually only use it once in the condition for mouth movement.

Another challenge is to decide the code that excudes under each conditions. Inspired by the bouncing ball, I put the variable in the y coordinates of those two control points (point C and point D) and change their direction by changing the direction of their speed.

Even my idea is to show the sunflower changing faces because of the sun's movement, the sky color actually changes with the sunflower's face. It is very hard to apply variables of RGB in the curve of a sunflower's mouth, so I related the alpha value of background color to var1, which is the variable that controls the opacity of the background.

Reflection

1.Try to include time in P5.js.

2.Make bouncing effect by changing the direction of the speed in IF/ELSE condition.

3.Had a deeper understanding of RGB value and alpha value. Make sky change effect based on this understanding.

4.Got a better understand of PI system by drawing the petals of the sunflower.

5.Upload images on P5.js and edit the image use function in P5.js.

6.Break the change down into different phrases and conditions when thinking about a movement. Pay more attention to the start and end of each phrase.

New things to think about/try:

*How to redefine time in P5.js(like make the moment I hit run as second 0 ).

*Try to represent changes a mathematical way.