Hierarchical N-body solver
Fast Multipole Gravity Lab
2D softened Newtonian gravity with a Cartesian FMM — quadtree, multipole → local, direct neighbours.
M2M → M2L → L2L → P2P
Telemetry
Particles
1024
FPS
—
Solve
— ms
Nodes
—
M2L pairs
—
Force error
—
Settings
FMM • Physics • View
Scene
Preset
Spiral galaxy
Binary galaxies
Orbital ring
Cold collapse
Three-body tracers
Particles
128–8192
1024
Reset
Pause
Single step
Clear trails
Solver pipeline
Each step rebuilds an adaptive quadtree.
M2M
: child moments → parent
M2L
: far cells → local fields (kernel Taylor jet)
L2L
: parent fields → leaves
P2P
: exact neighbouring forces
FMM solver
Expansion order $p$
3
Separation ratio
1.60
Leaf capacity
32
Physics
Gravity $G$
0.65
Softening $\epsilon$
0.018
Timestep $\Delta t$
0.0030
View
Particle trails
Quadtree overlay
Acceleration vectors
Automatic sampled error
Click to inject a particle cloud · Shift-click to add a massive body · Space pauses