Two separate physics problems, back to back
A firework display is really two independent physics problems chained together. First, a projectile problem: the shell launches, follows a parabolic-ish arc under gravity and air drag, and reaches its burst point. Second, a particle explosion problem: at that point, dozens to hundreds of burning stars are released simultaneously in all directions, and each one is now its own tiny projectile, subject to the same gravity and drag as the shell was, just starting from a different velocity.
The launch: gravity and drag together
Without air resistance, a launched shell would follow a perfect parabola — the textbook projectile motion result. Real fireworks are light for their size and moving fast, so drag is not a footnote, it's a major term: drag force grows with the square of speed, so it dominates early in the flight and matters much less once the shell has slowed near the top of its arc.
a = g - (drag_coeff * |v| * v) / mass // drag opposes velocity, scales with v² v += a * dt x += v * dt
This is why real firework shells look like they slow down and curve over near the top rather than tracing a mathematically clean parabola — drag bleeds off horizontal speed faster than gravity alone would, bending the path.
The burst: turning one velocity into hundreds
At the burst point the shell's own velocity is inherited by every star, and then each star gets an additional velocity kick radiating outward — usually sampled roughly uniformly over a sphere (or a ring, for a ring-shaped burst pattern) so the shape reads as a symmetric ball rather than a lopsided splash. This is why a firework's expanding sphere visibly drifts as a whole in the direction the shell was still travelling when it burst, on top of expanding outward: every star's final velocity is shell velocity + radial burst velocity, added as vectors, not two separate unrelated motions.
star.velocity = shell.velocity + randomOnSphere() * burstSpeed
Color is a chemistry problem, not a physics one
Each star's colour comes from metal salts burning at flame temperature and emitting light at specific wavelengths characteristic of that element — strontium salts burn red, barium burns green, copper burns blue, sodium burns a strong yellow-orange. Getting a clean blue firework is notoriously the hardest of the bunch, because copper compounds that produce a good blue tend to decompose at the high temperatures needed for a bright burst, forcing a chemical tradeoff between colour purity and brightness that pyrotechnicians have been fighting for well over a century.
Trails, fade, and why the display looks alive
Each star also burns down over its lifetime — real stars are small pellets of a slow-burning composition that eventually exhausts itself, which simulations mimic with a fading alpha and often a shrinking radius over 1–3 seconds. Layer a short particle trail behind each star (a handful of fading ghost positions from the last few frames) and the burst reads as a glowing streak rather than a hard dot, which is most of what actually sells the "fireworks" look — the underlying physics is honestly just gravity plus drag applied to a lot of particles at once.
Frequently asked questions
Why do firework bursts look like they drift sideways as they expand?
Because every star's velocity is the shell's own velocity at the moment of the burst plus its own outward burst velocity, added together. If the shell was still moving sideways or upward when it exploded, the whole expanding sphere carries that motion with it while also spreading out.
Why is it so hard to make a good blue firework?
Blue comes from copper compounds, but the copper chemistry that gives a pure blue colour tends to break down at the high temperatures needed for a bright, energetic burst — so pyrotechnicians have to trade off between colour purity and brightness, unlike red (strontium) or green (barium), which stay stable at higher burn temperatures.
Does air resistance actually matter for something as fast as a firework shell?
Yes, significantly — drag force scales with velocity squared, so it's strongest right after launch when the shell is moving fastest, and it's the reason a real shell's rising arc visibly bends rather than tracing the clean parabola you'd get from gravity alone.
Try it live
Everything above runs in your browser — open Fireworks and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.
▶ Open Fireworks simulation