One day near the end of July, a memory suddenly came back to me, tied to something I'd built a while back. And here it is: a firework simulation coded in Python, originally made to celebrate the new year.
This project is really simple, just a bit over 200 lines of code. Still, it kept me busy for a whole evening. The core idea behind a single firework splits into 2 parts:
- Launch straight up, with velocity gradually decreasing down to zero
- Explode, sending sparks flying out in every direction and falling back down under gravity
Once you have that idea, all that's left is describing these stages with some basic high-school physics, then adding color and sound to make it fun. For the full picture, check out the source code at Tung-hehe/fireworks-simulator.
These days, with a strong enough AI, you could probably build something like this in just a few minutes. But I still remember the feeling of turning an idea in my head into something real - the satisfaction of watching it behave exactly as I wanted, and above all, the sense of meaning in sending something I made with my own hands to the people I care about.
That's it for this short post - hope you find something worth taking away from it.
Happy coding!
