3 Body Gravitational Simulation

Опубликовано: 30 Август 2026
на канале: AL
2,290
50

After being inspired by another video on the same topic, I decided to make my own. This was a relatively quick and dirty implementation using the Godot game engine: no fancy Runge-Kutta here (just simple Euler's method) and pretty rudimentary graphics, but it works*. The white pixel in the middle shows the centre of mass for the 3-body system... which is also what the camera is fixed to so you won't see it move.

*Interestingly I get different results when rerunning the simulation even without any change to the initial conditions - it isn't obvious to me why this would happen, I would naively expect any numerical instabilities to err the same way given the same start... maybe Godot is introducing a source of randomness somehow?

Link to inspiration:    • Three-Body Problem Simulation with 3 Free ...