A stunning new NASA video shows a spiral galaxy like our own Milky Way form and take shape, compressing more than 13 billion years of cosmic evolution into about 45 seconds.

The galaxy-evolution video— a supercomputer simulation created by researchers at NASA's Goddard Space Flight Center — chronicles the growth of a spiral, beginning with its birth shortly after the Big Bang that created the universe 13.8 billion years ago.

"Galaxies are thought to begin as small clouds of stars and dust swirling through space. As other clouds get close, gravity sends these objects careening into one another and knits them into larger spinning packs," NASA officials wrote in a description of the video released Tuesday (May 13).

"Subsequent collisions can sling material toward a galaxy’s outskirts, creating extensive spiral arms filled with colonies of stars," they add. "Watch the video to see this process unfold."

Mergers have been important in shaping the Milky Way galaxy since its birth about 13.5 billion years ago. The Milky Way has gobbled up a number of satellite dwarf galaxies over the eons, for example, and is set for a much more dramatic collision in the future.

Following a collision, stars and other material begin settling into orbits around a new galactic core.
Following a collision, stars and other material begin settling into orbits around a new galactic core.
Credit: NASA's Goddard Space Flight Center

The Milky Way and neighboring Andromeda, another spiral galaxy that's even bigger than our own, are currently barreling toward each other at about 250,000 mph (400,000 km/h). Four billion years from now, they will begin coming together in a huge galactic smashup that will dazzle Earthbound skywatchers (if any humans are still around by then).

When the dust has cleared in about six billion years, the result will likely be a new hybrid "Milkomeda" galaxy with an elliptical rather than a spiral shape, researchers say.

You can view the new NASA galaxy-evolution simulation on your iPhone or iPad using the NASA Visualization Explorer. Learn more about this free app here: https://itunes.apple.com/us/app/nasa-visualization-explorer/id448700202?ls=1&mt=8

Dust off your spiral arms and fatten up your bulge — it's time to tap into your inner galaxy to test your smarts about the Milky Way. Our home in space is a strange and wondrous place that scientists are still trying to figure out. See what you know!
The Milky Way Galaxy is organized into spiral arms of giant stars that illuminate interstellar gas and dust. The sun is in a finger called the Orion Spur.
0 of 10 questions complete
Milky Way Quiz: Test Your Galaxy Smarts
Dust off your spiral arms and fatten up your bulge — it's time to tap into your inner galaxy to test your smarts about the Milky Way. Our home in space is a strange and wondrous place that scientists are still trying to figure out. See what you know!
The Milky Way Galaxy is organized into spiral arms of giant stars that illuminate interstellar gas and dust. The sun is in a finger called the Orion Spur.
0 of questions complete

Follow Mike Wall on Twitter @michaeldwall and Google+. Follow us @Spacedotcom, Facebook or Google+. Originally published on Space.com.