Particle fountain / fireworks in the terminal, in C.
A small, self-contained demo written in pure C — no external libraries, just the standard library and POSIX. Part of the Corg-Labs collection of single-file C programs.
- Particles spawn at the base with an upward random velocity
- Gravity accelerates each particle every frame
- A life value fades the particle's character over time
- Dead particles are recycled for new emissions
gcc fountain.c -o fountain -lm
./fountain
Press Ctrl-C to quit.