Войти
  • 37297Просмотров
  • 3 года назадОпубликованоWilliam Y. Feng

Quadtrees and The Barnes-Hut Algorithm: The Making of a Gravity Simulation

Have you ever been entranced by the beauty of gravity simulations? In this video, I explain the Barnes-Hut algorithm for quickly computing solutions to the n-body problem. Code: Barnes-hut article: Collisions explained: 00:00 Intro 00:27 The physics of gravity 03:38 A naive approach 05:16 Quadtrees 10:00 Barnes-Hut 12:46 Time complexity analysis 14:02 Collisions! 16:25 Outtro