The Fastest Gravity Algorithm You've Never Heard Of: Fast Multipole Method

Опубликовано: 30 Июль 2026
на канале: Keyframe Codes
60,356
3.2k

The finale to my Particle Simulation series, and maybe my most pretty video to date. This algorithm is absolutely amazing, and I hope I succeeded in creating the best explanation there is (at least on this platform).

Check out the code for my animations here: https://github.com/keyframe41/Videos/...
This video was made for the Summer of Math Exposition (#SoME5), a competition for online math explainers. Check out more entries from other people here: https://some.3b1b.co/

Original FMM paper: https://math.pku.edu.cn/teachers/litj...
Adaptive FMM paper: https://math.nyu.edu/~greengar/cgr_88...

Timestamps:
0:00 Intro
1:52 Force in 2D
3:44 Cauchy-Riemann Equations
5:51 Barnes-Hut
8:14 Multipole Expansion
14:00 Local Expansion
17:04 Flip Operation
19:20 Shifting Multipole Expansions
22:20 Shifting Local Expansions
23:53 Balanced FMM
26:28 Adaptive FMM
29:44 Outro

Music:    • JOURNEY - A Chillwave Synthwave Mix