Most textbooks teach that our galaxy, the Milky Way, resembles a flat spiral, with several prominent arms spinning out from the center. But a new, detailed 3-D map of the galaxy puts a twist in that image, literally. It turns out that the galaxy is not a flat pancake but warped with the edges curling above and below the galactic plane.

Getting an actual look at our own galaxy is basically impossible. So far, our most distant space probes have barely left our own solar system and will likely never leave the galaxy to capture an image from a distance. So astronomers have to rely on modeling to figure things out using the telescopes and instruments we have. That’s difficult because Earth is parked in a small spiral arm about 26,000 from the galactic center, making it hard to take in the big picture.

Elizabeth Gibney at Nature reports that prior to this study, the best maps of the Milky Way, which is about 120,000 light years in diameter, used indirect measurements, like counting stars and extrapolating information from other nearby spiral galaxies that we can see. But for this study, researchers from the University of Warsaw used the Optical Gravitational Lensing Experiment telescope at Las Campanas Observatory in Chile to analyze the Cepheids, a group of stars that brighten and dim on a predictable cycle, directly measuring their distances.

Over the course of six years, the team catalogued 2,341 Cepheids stretching across the galaxy, taking 206,726 images of the stars. Observing stars from Earth, it’s sometimes hard to know how bright they really are. A super-bright star that is very far away may appear dim. But researchers know that the slower a Cepheid star pulses, the brighter it really is, which allows them to calculate its true, or intrinsic, brightness. By comparing the brightness level of the star with its apparent brightness from Earth, the researchers were able to determine the distance and three-dimensional position of each Cepheid with more than 95 percent accuracy. Using these data points, they plotted the positon of the Cepheids throughout the galaxy, creating a structural map. The study appears in the journal Science.

Researchers using other techniques have hypothesized that the Milky Way is warped and that the galaxy actually flares at the edges. Close to the galactic center, it’s about 500 light years wide. At the edges, it’s about 3,000 light years thick. This new visualization confirms that warp and flare and shows that they’re pretty significant.

“If we could see our galaxy from the side, we would clearly see its warp,” study leader Dorota Skowron tells George Dvorsky at Gizmodo. “Stars that are 60,000 light-years away from the Milky Way’s center are as far as 5,000 light-years above or below the Galactic plane. This is a big percentage.”

So why is our galaxy kind of twisted? Nadia Drake at National Geographic reports that warped spiral galaxies are not unusual and astronomers have catalogued many, including the Milky Way’s twin sister galaxy Andromeda. Nicola Davis at The Guardian reports that as many as half the galaxies in the universe have some degree of warping, but the Milky Way’s twists are larger than average.

It’s not completely clear what curled our edges, but researchers suspect it has to do with interactions between the galaxies in the local group, several dozen galaxies and dwarf galaxies clustered within 10 million light-years of the Milky Way. “We think the warp may have been caused by interactions with satellite galaxies,” Skowron tells Drake. “Other ideas point to interactions with intergalactic gas or dark matter.”

The new data may also provide some insight into how the galaxy evolved. The researchers identified three patches of Cepheids that are only 20 million to 260 million years old, mere babies compared to the oldest stars in the galaxy, which are 10 to 13 billion years old. The Guardian’s Davis reports that the youngest stars are closer to the galactic center while the older ones are farther out in the spiral arms. It’s possible that interaction with a passing dwarf galaxy could have caused them to pop into existence. Computer simulations show that to create the pattern they are found in, some sort of star forming events had to occur 64 million, 113 million and 175 million years ago.

Xiaodian Chen from the National Astronomical Observatories at the Chinese Academy of Sciences was part of a similar study published in February that also used a group of Cepheids to map the Milky Way’s 3-D structure. He believes this map is solid. “They essentially confirmed our earlier conclusions regarding the 3-D shape of the Milky Way’s disk, including its flaring in the outer regions,” Chen says. “A good thing about their confirmation of our work is that they used a different data set, covering 2,431 Cepheids compared to [our] 2,330, observed with a different telescope and through different filters. Yet they found pretty much the same result, which is comforting!”

While this new map is the most accurate in terms of revealing the galaxy’s overall structure, it’s by no means the most detailed look at our galaxy. Last year, the European Space Agency’s Gaia star mapper released the position and brightness of the 1.7 billion stars in our immediate neighborhood in the Milky Way and detailed data on 2 million of those stars.