This page moves tens of thousands of particles on the GPU. It needs WebGPU: Chrome or Edge 113+, Safari 26+, or Firefox 141+ on Windows.
Strongest pull: each particle takes the colour of the body that pulls on it hardest. The borders between colours are where gravity changes hands.
Particle count and pixels. A change starts the run again.
Every body pulls on every other with Newton’s law of gravity, . Nothing is scripted: the computer adds up the pulls and takes small steps in time.
The bodies (stars, planets, moons, black holes, galaxy cores) are computed in double precision with a 6th-order integrator that takes smaller steps in close passes. The particles (dust, debris, the stars of a galaxy disk) feel the bodies but are too light to pull back; thousands of them move on the GPU. In the disk experiment every particle pulls on every other.
Pick something from the tray and throw it in: a planet, a star, a black hole, a swarm of rocks. A tap gives a circular orbit; a drag throws it. The dashed line shows its path.
Randomize mixes the 22 experiments, adds intruders on computed paths, and generates new scenes. Each roll has a seed in the link, so you can share it.
This is a taste of Stella Nova, a game built on a gravity simulation. Wishlist it on Steam.