Our galaxy is big. But it's due to get a lot bigger: in a few billion years, the Milky Way will slam into its nearest neighbour, the Andromeda Spiral, eventually creating a super-sized stellar clump. And visitors to the Hayden Planetarium at New York's American Museum of Natural History can now see a preview of the monumental event as it is likely to unfold.

The scene is the denouement of Cosmic Collisions, a $3-million film that reveals the power of impacts great and small to shape our world and the Universe. The project also showcases the prodigious supercomputing power now available to astrophysicists — the largely computer-generated movie visualizes some of theorists' most advanced simulations of cosmic processes.

Forthcoming attraction: a simulation of the Milky Way's merger with Andromeda (left). Credit: AM. MUS. NAT. HIST.

The film focuses on impacts across a mind-boggling range of scales, from the proton collisions that power the Sun, to the asteroid smash that may have done for the dinosaurs, to the pas de deux of galaxies played out over millions of years.

The team behind the film, including the museum's astrophysics department, NASA and more than 25 researchers from around the world, based their pictures on supercomputer simulations and satellite images.

The starry sky, created using a virtual map called the Digital Universe, forms a backdrop to the film's opening, over which the gravelly tones of Robert Redford inform us that, although space might look tranquil, its myriad collisions make it a violent place.

This becomes clear during a scene in which the serenly drifting Earth is suddenly slammed by a planet-sized body that seems to appear from nowhere. This event really happened, 4.5 billion years ago, and in the space of a month it gave us our Moon. The film draws on simulations of lumps of debris being drawn together by gravity to show us how this remarkably rapid process occurred.

The film culminates with the climactic sequence in which two galaxies, each containing hundreds of billions of stars, meet. The sequence, which lasts less than a minute but in which every second represents 40 million years, is the product of more than 40,000 hours of computing time.

The galactic clash is based on simulating the behaviour of individual stars within each cluster, and comparing the results with data on real galactic collisions. Transforming that information into a visual sequence was the work of yet more supercomputers.

As for the event itself, the collision won't cause much disruption to any civilizations still around. As Redford reassures us, “Stars and planets in these galaxies won't actually collide. They're much too far apart. Scientists think they'll simply slide past one another.” Nevertheless, you'll have to go a lot further than New York to get such a grandstand view of the real thing.

Cosmic Collisions is showing at the Hayden Planetarium, American Museum of Natural History, New York.