Even when the Icelandic volcano Eyjafjallajokull was shooting more than 500 tons of ash per second into the air last month, children somewhere surely were parading around with festive funnels of cotton candy.

The connection between the ash and the candy? More than you might think (unless you are a chemist): Both are forms of glass.

The word "glass" most readily conjures windows and juice glasses. But limiting your notion of glass to those old standards would do a great disservice to a material that has had an enormous role in the history of art, science, technology and, as it turns out, food.

What makes a solid material a glass is the imperfect ways its atoms are arranged. Crystalline materials such as table sugar and quartz gems have essentially perfect geometric lineups of their atomic or molecular parts. Imagine a beautiful stack of oranges (a stack that goes on forever and whose units are a couple hundred-millionths the size of a piece of fruit) and you'll get a feel for a crystal's internal structure.

Now imagine messing up that perfect orange stack into a more random pile, with gaps here and there, and grapes and watermelons abetting the disorder. That's what glass looks like on a molecular level.

"Glass does not have this long-range order," says geochemist Bjorn O. Mysen of the Carnegie Institute of Washington's Geophysical Laboratory. Window glass has the same basic composition as quartz crystal (the major ingredient in both is silica sand), but it also has some organizational spoilers, such as calcium and sodium ions, that keep it from forming into a crystal.

But what really makes silica form into a glass instead of a crystal is the speed with which it solidifies from the molten state. Slow cooling gives the searing liquid enough time for its silica and a few other ingredients to settle into that regimented crystalline pattern. But if you speed up that cooling enough, the bonding behavior becomes more random and you get glass. This chaotic structure is why glass can take on just about any shape and why it breaks by shattering, rather than by cleaving along straight geometric planes the way crystals do when they break. Silica happens to not absorb light of visible wavelengths, which is largely why it is transparent. But add enough other absorptive elements, such as iron or cobalt (which are what gives color to glass), or if the glass solidifies with too many tiny bubbles and other imperfections that scatter light, and you will end up with glass you can't see through.

Eyjafjallajokull's specific recipe for glass grains that float in the air includes silica, alumina, iron oxide, calcium oxide, and a half-dozen other oxides, according to a chemical analysis by researchers at the University of Iceland's Nordic Volcanological Center. During the eruption, a molten mixture of these was shot through an ice-filled crater at the summit. That provided the rapid cooling needed to make glass. Then, this nascent glass was pulverized into microscopic flecks by great blasts of steam and gas from the volcano. In just three days of eruptions in April, 100 million metric tons of this glassy ash would bring air traffic over Europe to a halt. It would take the world's entire glass industry years to produce that much glass.

Volcanoes produce other forms of glass, among them tufts of delicate thread known as Pele's hair (named for the Hawaiian goddess of volcanoes) and often curvaceous pellets aptly called Pele's tears. If the lava is rich enough in silica, it can form obsidian, a dark and sometimes green, brown or black glass that has been coveted by many cultures throughout history for, among other properties, its ability to take on razor-sharp edges. Meteorite impacts can produce tektites, glass pieces that form from earthly ingredients that melt from the energy of the impact and then resolidify quickly. Even lightning that strikes sandy soils can produce glass, in the form of wickedly shaped fulgurites embedded in the ground and sometimes called petrified lightning.

Nature clearly has a flair for producing glass's signature molecular disorder. Humans do, too, having created glass beads and pottery glazes as far back as 5,000 years ago. Today we have fabricated glass into everything from massive telescope lenses to fiber optics that can carry trillions of bits of data. But among the most enticing forms of glass are the edible ones. Cotton candy, for one, forms when molten sugar (sucrose) in a hot and spinning bowl spits out of tiny holes and meets the cold air. With no time for the liquid sucrose to recrystallize, it freezes into threads of sweet, edible glass.

And then there is the lowly potato chip. As Chris Young, former manager of food research and development at London's Fat Duck restaurant put it: "A potato chip is a glass." It is made up largely of starch molecules in a noncrystalline arrangement. "This is why a potato chip is crisp," he says. "The chip shatters catastrophically when you bite into it. Cracks spider out in all directions." Similarly, the hard top of a creme brulee, pastas, crackers, cookies and even meringues have amorphous molecular structures that Young describes as edible glass.

Young is working on a book about science-based, high-tech cooking with Nathan Myhrvold, formerly chief technology officer at Microsoft and co-founder of Intellectual Ventures. They have even gone volcanic by developing a novelty dish that looks like a type of glassy volcanic rock known as pumice. Among the ingredients are vegetables burnt to a black, all-carbon powder (a food-grade version of the stuff that makes tires black), the non-sweet sugar isomalt, and savory brazing juices from a pork roast.

"We boil it to form a molten glass," Young says. Then, by adding baking soda and vinegar, the classic combo for a tabletop volcano, the mixture gets filled with carbon dioxide bubbles. After coating candied prunes in the goop, they finish the job inside a vacuum chamber, where the CO2 gas expands, generating a foamy texture around the fruit. The result, says Young, is "an edible aerated glass that is just like pumice." And unlikely to ground air traffic across a continent.