Hierarchical N-body solver

Fast Multipole Gravity Lab

Softened 2D gravity with an adaptive quadtree, Cartesian multipole expansions and truncated Taylor kernel jets. Every interaction is either a far-field multipole translation or an exact near-field pair — no all-pairs loop, so a step stays linear in particle count.

P2M → M2M  →  M2L  →  L2L  →  P2P
Telemetry
Particles1024
Frames / s—
Solve + integrate—
Tree nodes (depth)0

M2M upward0 M2L far0 L2L downward0 P2P exact pairs0

Sampled force error—
Step stiffness δ—
Scene
FMM solver
Physics
View
Click to inject a dust cloud · Shift-click drops a massive body · Space pause · T tree · R reset · error bar compares against direct O(N²) summation