When Mary Caswell Stoddard started measuring bird eggs from hundreds of species, she wasn’t expecting to learn that most eggs are not egg-shaped.

Think about an egg and you’ll probably conjure up an ellipse that’s slightly fatter at one end—the classic chicken egg. But chickens are outliers. Hummingbirds lay eggs that look like Tic Tacs, owls lay nigh-perfect spheres, and sandpipers lay almost conical eggs that end in a rounded point. After analyzing hundreds of species, Stoddard showed that the most common shape—exemplified by an unremarkable songbird called the graceful prinia—is more pointed than a chicken’s.

“We mapped egg shapes like astronomers map stars,” Stoddard says. “And our concept of an egg is on the periphery of egg shapes.”

Beyond displacing chickens as the Platonic ideal of egg-dom, Stoddard’s data also helped her to solve a mystery that scientists have debated for centuries: Why exactly are eggs shaped the way they are?

Researchers have argued that pointy eggs are common to cliff-nesting birds because they roll in a circle and are less likely to tumble off an edge. Or that asymmetric eggs pack together more easily and would allow females with large clutches to incubate their broods efficiently. Or that spherical eggs are stronger and less prone to breaking, or use the least amount of shell for a given volume, which would be useful for birds that can’t get enough calcium in their diet.

“There are a lot of hypotheses, but no conclusive explanation or theory,” says Stoddard, who’s an evolutionary biologist based at Princeton University. “It was a good puzzle.”

To solve it, Stoddard teamed up with L. Mahadevan, a biophysicist at Harvard University who has studied “how leaves ripple, how tendrils coil, and how the brain folds, among other things.” He realized that all eggs could be described according to two simple characteristics—how asymmetric they are, and how elliptical they are. Measure these traits, and you can plot every bird egg on a simple graph. They did that for the eggs of 1,400 bird species, whose measurements Stoddard extracted from almost 50,000 photos. It was the resulting graph that revealed the left-field nature of chicken eggs.

As well as measuring eggs, the team also collected a huge amount of data for their 1,400 bird species, including body mass, clutch number, diet, nest location, how quickly they grow, the climate in which they live, and more. Some of these factors can explain egg size—bigger birds with smaller clutches tend to have longer eggs—but to the team’s surprise, none of these factors explained egg shape. This meant that many of the existing hypotheses for egg shape don’t actually hold up when you study a lot of eggs. Cliff-nesting birds, for example, don’t have pointier-than-average eggs.

In fact, only one factor correlated well with egg shape: a bird’s flying ability. You can quantify that by measuring a bird’s wing. The wingtips of the most accomplished aeronauts are longer relative to their hand bones. And as Stoddard’s team found, these good fliers are also more likely to have asymmetric and elliptical eggs. “I was truly surprised by that,” she says.

You can see that pattern across the birds in general, and you can even see it within closely related groups. Hummingbirds are great fliers, but their closest relatives—the swifts—are even better, and while hummingbird eggs are symmetrical, swift eggs are pointed, more like pine nuts than Tic Tacs. Owls tend to have spherical eggs, but the better fliers among them, like barn owls, have more elliptical ones than their relatives.

Penguins are exceptions that prove the rule. They may be flightless but they swim by essentially flying underwater, so their eggs are pointed rather than symmetric; they were probably influenced by the same evolutionary forces that create asymmetric eggs in strong airborne fliers.

Those forces are not obvious, but they’re related to the way eggs are built. It begins when an unfertilized egg cell is added to a globule of yolk, and sent down a bird’s oviduct—a long canal that Stoddard describes as “a stretchy tube like a sock or pantyhose.” On its travels, it is fertilized by sperm, surrounded by white, and coated in two membranes. The membranes are pumped with fluid like a balloon being inflated, and finally surrounded by a shell. Counter-intuitively, it’s not the shell that matters most, but the membranes. If you dissolve the shell in acid, the naked egg will still retain its original shape.

So, what shapes the membranes?

Birds face a packing problem. As they become better fliers, their internal organs become more tightly packed to streamline their bodies. Their oviduct gets narrower, which sets a limit on the width of their egg. For the best fliers, that limit is especially severe. And they seem to have circumvented it by evolving longer, pointier eggs, which can keep the same volume without being any wider.

It’s not that having a pointy egg confers an adaptive advantage to a flying female. Instead, Stoddard thinks that long, pointy eggs are an incidental consequence of having a streamlined body. Flight narrows the oviduct, which changes the type of egg a bird can lay. It’s perhaps no coincidence that the only dinosaurs known to lay pointy eggs were the maniraptorans—the small, feathered hunters like Velociraptor that eventually gave rise to birds. “Asymmetry seems to have arisen at the same time as powered flight,” says Stoddard.

“Why didn’t we think of that?” asks Tim Birkhead, an ornithologist from the University of Sheffield who once wrote a book about bird eggs called The Most Perfect Thing. “The idea that female anatomy might determine egg shape is an old one, but this study has ingeniously unpicked it and identified some interesting patterns.”

“It’s purely hypothetical at this point,” Stoddard says. “We don’t really know what happens in the oviduct.” But Mahadevan and his student Ee Hou Yong picked up some clues by creating a computer model that simulates the egg’s journey through that canal. They found that two properties were especially important: the pressure acting upon the egg in the oviduct, and how the membranes vary in their thickness from one end to another. If the team changed these two variables, they could simulate eggs of every shape found in nature.

“This should inspire a huge flowering of studies testing whether nature works the way they predict it does,” says Claire Spottiswoode, from the University of Cambridge. “It’s remarkable that a trait as intuitively familiar as egg shape is so poorly understood. If you open up a textbook, you just get a bunch of anecdotes. They’ve made a really rigorous and thorough attempt to identify the evolutionary pressures acting on egg shape, and I think their answer would surprise most of us.”