Firecrackers are easy: Light the fuse and run. But most firework explosions are a bit more complex.
A Roman candle, for example, burns top-down through several layers of pyrotechnic charges called stars.
Their colors come from metallic powders: aluminum burns white. Copper gives fireworks a blue color. Lithium or strontium powder turns them red.
Mortar shells — the quintessential aerial fireworks you see in the big displays — require careful assembly beforehand.
See some of the best firework displays:
The arrangement of stars determines what they look like when they burst midair. A circle-shaped pattern yields a circular firework. Star-shaped patterns give up star-shaped fireworks, and so on.
The timing of what explodes when and with what force can be controlled with precise fuses and thicker wrappings.
Even the noise they make can come down to what they're made of. Certain fuels, for example, can make flying fireworks sound like they're whistling.