Galaxy Collider

Galaxy Collider Overview

A computational physics simulation project that models galaxy collisions and mergers, with a specific focus on reproducing the unique structure of the Cartwheel Galaxy through precise collision parameters.


This project implements a large-scale N-body simulation to model the complex gravitational interactions between 10,000 stars per galaxy. The primary goal was to demonstrate how the distinctive ring structure of the Cartwheel Galaxy forms when two galaxies with aligned rotation axes collide. Using parallel computation in C for high-performance processing and Matlab for visualization, the simulation tracks and calculates the gravitational trajectories of each star as the galaxies merge, demonstrating this unique collision scenario and resulting structure.


Technical Implementation

Core Components

  • Physics Engine: Parallel C N-body simulation core
  • Scale: 10,000 stars per galaxy
  • Computation: Parallel gravitational calculations
  • Visualization: Matlab 3D rendering and animation

Simulation Features

  • Gravitational force calculations
  • Time-step integration methods
  • Collision detection algorithms
  • 3D trajectory tracking
  • Rotation axis alignment parameters

Key Challenges

The project addressed several computational physics challenges:

  • Parallelizing gravitational calculations for 20,000+ interacting bodies
  • Optimizing N-body calculations for large star systems
  • Implementing stable numerical integration methods
  • Managing memory efficiency for large datasets
  • Creating meaningful 3D visualizations of complex trajectories

Learning Outcomes

This course project provided practical experience in:

  • Advanced C programming and optimization techniques
  • Numerical methods for physics simulations
  • Scientific visualization and data presentation
  • Performance optimization for computational physics