Spring Day is an interactive art piece based on flowers blooming in spring (made with p5). Since the driving concepts for this art piece were flowers and spring, the main piece is a flower that has rotating flower petals with pollen moving across the screen.
I used arrays and objects to create this project. I used three different objects for the three layers of petals on the flowers. I also had to use rectMode and anglemode to make the flowers rotate based on the mouse's position on the screen. I made it in way that when the mouse was to the left of the flower, the petals rotated anticlockwise and when the mouse was to the right, the petals rotated clockwise. The speed of the petal's rotation was also determined by the mouse position; so the closer the mouse was to the flower, the slower it rotated and the further away the mouse was, the faster the petals spun. Moreover, I added a pollen object that made pollen move across the screen. The user was also able to create pollen at the mouse pointer's position by left clicking on the screen.
After the main code was done, I had to create a background landscape that aligned with the spring aesthetic. I used vibrant and pastel colors to achieve this aesthetic and I also gave the objects outlines to make the piece look more playful and cartoony.
I'm happy with the way the vision I had in mind for this project came to reality. I wanted to make a calming piece about flowers that users could interact with. I was also very proud with the way I coded the flower petals to rotate clockwise or counterclockwise based on the mouse's location on the screen. I am also glad I was able to use the mouse pressed function to add new items to my pollen object. I do think this project could've been improved if I added more flowers around the canvas but given the time constraints I had, I felt it'll be too much additional code, so I opted to add multiple layers of petals to the only flower on the canvas. Here is the link to the p5 project: https://editor.p5js.org/Lunafina/sketches/DwXuniiAZ
Sound from Freesound.org