Swift in Space – The N-Body Problem
summary
Shows a concrete Swift implementation that replaces the O(N^2) pairwise loop with a Barnes‑Hut tree quadtree, collapsing many distant bodies into virtual masses so force calculation runs in n log n time instead of quadratic. Presents code on GitHub, a simple Body object with accelerate/update methods, and a working simulator that visualizes hundreds of bodies with SpriteKit. Reports brute force is faster for tiny N but dies as N grows, while Barnes‑Hut scales and produces believable orbital dynamics and reentry maneuvers.
AI-written summary · about
chapters (8)
- 0:00Introduction to celestial mechanics
- 1:47Heliocentric model origins
- 5:31Newton’s gravitational law
- 8:00N-body problem complexity
- 10:49Barnes-Hut algorithm
- 15:01Code implementation overview
- 18:53Orbital navigation basics
- 22:31Q&A on orbital dynamics
related talks
18mScientific Swift
41mSwift + Metal: The future of scientific programming?
59mSimulating the Universe Using Modern C++
18mSwift: Fast Performance Tuning with GAN-Generated Configurations
11mLightning Talk: But How Do You Autograd Through Your Simulator? Making a...
30mMultibody Simulation Using sympy, scipy and vpython
38mDesigning Augmented Reality Systems for Speed
07mSwarm Intelligence Algorithms - Session Interview With Frances Buontempo
