An adaptive-quadtree Cartesian FMM in pure JavaScript. Far fields are compressed into multipole & local expansions; only neighbouring leaves interact directly.
M2M → M2L → L2L → P2P
Click to inject a particle cloud · Shift-click to add a massive body · Space pauses