For this midterm live coding project, I decided to build on my solution to Problem 3 from this week's assignment. I expanded the original sketch with additional features and chose the improved version as the starting point for my live coding demonstration. Since winter is just around the corner, I thought a snowfall-themed sketch would be perfect for the season!
Screen Recording 2026-10-13 at 11.17.52 PM.mov
The original sketch was pretty simple. When the user clicked the mouse, snowflakes would appear and fall down the screen.
For this live coding project, I wanted to see how small changes in my code could completely transform the behavior of the snowflakes. Instead of creating something new from scratch, I decided to experiment with the existing code by changing different values and functions.
Screen Recording 2026-10-13 at 11.24.18 PM.mov

Before: random(-2,2)
After: random(-15,15)
First, I experimented with the wind by increasing the range of random values controlling the snowflakes' horizontal movement. Originally, the snowflakes gently drifted from side to side. After changing the range, they started moving much more unpredictably, almost as if they were caught in a strong wind.
Screen Recording 2026-10-13 at 11.28.50 PM.mov

Before: speed:random(1,5)
After: speed:random(-5,-1)
Next, I wondered what would happen if the snowflakes moved in the opposite direction. By changing their speed values from positive to negative, I made the snowflakes float upward instead of falling down.
I also noticed something interesting: the snowflakes stopped when they reached the bottom of the canvas, but they didn't stop at the top. This happened because my if statement only checked the bottom boundary, not the top.