← 🔭 Space & Astronomy
🌌 Spiral Galaxy · 80 000 particles

🌌 Galaxy



Drag — rotate · Scroll — zoom

🌌 Galaxy — 3D Spiral Simulation

Real-time simulation of a spiral galaxy using GPU-accelerated gravity. Watch stellar orbits stabilise into spiral arms over millions of simulated years, revealing the gravitational choreography that shapes galactic structure.

🔬 What It Demonstrates

Stars are attracted via Newton's inverse-square gravity, approximated with a Barnes-Hut tree. Differential rotation at different orbital radii naturally creates trailing spiral arms — an emergent pattern.

🎮 How to Use

Drag to rotate, scroll to zoom. Use sliders to adjust star count, gravitational softening, and rotation speed. Add a second galaxy and watch them collide and merge over simulated aeons.

💡 Did You Know?

Real galaxy rotation curves do not match Newtonian predictions for visible matter alone — they stay flat far from the centre. This discrepancy is key evidence for Dark Matter making up ~27% of the universe.