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

Particles1024
FPS
Solve— ms
Nodes
M2L pairs
Force error
SettingsFMM • Physics • View

Scene

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

Physics

View

Click to inject a particle cloud · Shift-click to add a massive body · Space pauses