(It’s fireworks time in America. To celebrate, we’re republishing this fascinating article from 2015 by Inverse‘s Sean Hutchinson.)

Back in the day, 4th of July fireworks were just simple, cathartic bursts of color seen through a haze of beer and patriotic tears. Now fickle Independence Day crowds demand a more sophisticated spectacle: a complicated fireworks crescendo. To keep up the excitement while honoring the ol’ U.S.-of-A., technicians have constantly innovated and toiled in whatever fireworks labs look like to learn to make a variety of shapes in the sky. How are those shapes possible?

The basic firework starts off in groups of handmade spherical shells made of cardboard or heavy stock paper, with a special recipe of ingredients packed together inside. The key to getting a particular shape to a set off fireworks lies in how its so-called “stars” are aligned.

Stars are small plastic pellets packed with chemicals and separated by cardboard inserts. Eventually these stars produce the color of the firework after it explodes. Technicians looking to create a specific shape in the sky simply set up the same pattern with the stars inside the packaged shell before firing it.

For instance: Yellow stars are packed into smiley faces, red stars are arranged in the form of hearts. Cubes and butterfly patterns, says Julie Heckman, the Executive Director of the American Pyrotechnics Association, are the most common shapes. Hell, they can even make fireworks in the shape of Saturn or multi-color spiral shapes. If you can pack a shape out of stars in the fireworks shell, you can ignite that shape across the sky.

Certain seemingly simple shapes are still tricky. “The fireworks industry is still perfecting the ability to create alphabet letters,” Heckman told me, “but someday we may see names written in the sky.” The company to crack that code will have a huge advantage.

No single person is credited with inventing this method of packing stars in shells, but such shapes began gaining popularity around the early 1990s, when the relatively rudimentary tech was used to greet U.S. troops returning from Operation Desert Storm.

Photos via Flickr / SLR Jester