Week 5: Snowfall
I placed this snowflake into a class and created two snowflake instances. Adjusting different elements of the snowflake class changes the look of the individual snowflakes (Figure 2).
Next I created a move() function within the snowflake class to animate the two snowflakes (Figure 3). When the snowflakes move just past the height of the screen, they move back to the top and repeat the falling motion. This creates the look of a continuous snowfall.
In the end, I created an array of many unique snowflakes and displayed them falling at different rates (Figure 4). The final result can be viewed at this link. I had some trouble trying to get each individual snowflake to rotate about its own center as it fell. If I were to continue this project I would work on solving that problem and add more variation to the look of each snowflake.
Once I completed this project, I used serial input to connect this animation to an Arduino for my Pcomp homework. I adjusted the sparkle of each snowflake using the location of a potentiometer. Figures 5&6 show the results.