PPolySim OS

GPU N-Body

A galaxy of thousands of bodies, each pulling on every other. The full O(n²) gravitational interaction runs on your GPU — millions of force calculations per frame.

GPU N-Body Studio (WebGPU)Live

Controls

Every body attracts every other body — thousands of pairwise forces per frame, computed on your GPU.

Data Inspector

Backendstarting…
Bodies4,096
Interactions/frame16,777,216
FPS

Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.

or unlock everything with Pro →
★ Sign in to save this setup
Save your tuned setup, or drop this simulation into your own site, docs, or course page.

How it works

The compute shader uses workgroup-shared-memory tiling: each tile of body positions is cooperatively loaded into fast on-chip memory, then every thread accumulates gravitational acceleration from that tile before moving to the next. This is the standard GPU N-body pattern, and it lets a browser tab compute millions of pairwise forces per frame — well beyond what the CPU N-body studios can reach.

Ask the AI about this model

The math, the assumptions, real-world uses, or a code translation — explained for this exact simulation.

More WebGPU simulations

Frequently asked questions

Is this GPU N-body simulation tool really free?
Yes. GPU N-Body runs entirely in your browser using your device's own compute, so local use is free forever. You only pay Compute Tokens if you scale a job to the cloud.
Do I need to install anything?
No. Everything runs client-side in a modern browser — no downloads, no license, no account required to start.
Can I save or share my simulation?
Create a free account to save projects, and use a shareable embed or minted DOI to publish a live, interactive version anywhere.
How accurate are the results?
The solver uses established numerical methods, but results are for research and educational purposes and should be validated against experiment or professional review before you rely on them.