For my mom’s birthday (which is on 10/20) I turned the Week 6 simulation prompt into a little interactive gift: a field of heart-shaped candles that jitter, flicker, and remember whether they’re still lit. Each one waits for her click so it can “blow out” with a puff of smoke and whisper a birthday wish in the console.

I really liked the vibe of this sketch from Okazz and wanted to create something similar aesthetic wise
Structure with functions I broke the sketch into single-purpose helpers like regenerateHearts(), addHeart(), and drawHeartShape(). Each candle is just an instance of the Heart class stored in an array, looped over to update jitter and render flames. The reusable drawHeartShape() function uses two circles and a triangle to build the upright heart body. regenerateHearts() seeds the field by calling addHeart() with weighted size distributions—tiny confetti hearts, medium anchors, and a few large ones. Inside the Heart class, update() handles the jitter math and blow-out easing, while display() delegates to drawFlame() and drawSmoke() so each visual element stays focused. mousePressed() walks the array backward, checks contains(), logs a random birthday message, and triggers blowOut() on the first hit. Each helper handles one job, keeping the sketch modular and clean.
Flicker Logic Every lit candle oscillates in scale and alpha using sine waves seeded with a random offset, just enough to suggest a live flame without drowning the shape. When a blow-out starts, update() eases the flame height and opacity to zero over ~300 ms, then spins up a short smoke plume before settling into an "out" state. A post-smoke timer lets the wisp linger for another 450–750 ms before fading completely.
Interaction Clicking a flame logs a random birthday wish and triggers the blow-out sequence—small touches that make it feel like blowing out real candles, yet they only require conditionals, dist(), and deltaTime easing. Keys R and S regenerate the field or save a PNG, giving her a quick way to reset the party or capture a moment.
Palette and Mood
I used RGB mode with a weighted color pool. Flames are layered ellipses in warm yellows and oranges, while smoke uses soft grays so the whole scene retains that playful, celebratory vibe. Each candle sits at a random depth, so the canvas reads as a dense, overlapping party rather than a flat grid.
The animation layers heart-shaped candles across the canvas, each drawn from a Heart instance that tracks position, size, color, jitter amplitude, and state. When you click on a candle to “blow it out” (similar to the zap problem on the worksheet), a birthday message appears for my mom. The simulation aspect is modeling candle behavior as a system, and how they respond to getting blown out. Multiple candles burning, guests blowing them out one by one, and the gradual transition from a lit celebration to extinguished candle.
Reflections + What's Next?
This one was fun because I can’t celebrate my mom’s birthday with her. What’s next is to send it to her. Hopefully she knows how the sketch operates.
