← back to projects
in progress

N-Body Gravity Simulator

A real-time gravitational simulation of thousands of bodies running on the GPU. Every body attracts every other body each frame using Newton's law, giving a time complexity of N². I have the simulated bodies randomly distributed with initial velocities about a center point, to create cool galactic structures.

Try it!
status in progress
language JavaScript / GLSL
renderer WebGL2 ping-pong
bodies 2,048 — 131,072
source github
// how it works

Overview

Page coming soon.