Gravity at galaxy scale — over 100,000 bodies at once. Instead of computing every pair, the particle-mesh method solves gravity on a grid, so huge N stays interactive.
GPU N-Body — Particle Mesh (WebGPU)Live
mass deposit · Poisson solve · gradient push
Controls
The particle-mesh method scales to 100k+ bodies by solving gravity on a grid instead of pair-by-pair.
Data Inspector
Backendstarting…
Bodies65,536
Grid160×160
ComplexityO(N + G²·iters)
FPS—
Runs locally in your browser — free forever. Scale to the cloud when reality gets heavy.
★ Sign in to save this setupSave your tuned setup, or drop this simulation into your own site, docs, or course page.
How it works
Each frame the GPU deposits every particle's mass onto a grid (atomic adds), solves the gravitational Poisson equation ∇²φ = ρ with Jacobi iteration, then pushes each particle along the negative potential gradient. Because the cost is O(N + G²·iterations) rather than O(N²), it scales to hundreds of thousands of bodies — the same particle-mesh approach used in cosmological structure-formation simulations.
✦
Ask the AI about this model
The math, the assumptions, real-world uses, or a code translation — explained for this exact simulation.
Is this large-scale N-body simulation tool really free?▾
Yes. Particle-Mesh 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.