who doesn’t love a good ol’ n-body system
simulation? i was mainly inspired by this
(github) neat bot that generates
random 3-body simulations. however cool, this seemed a little dry to me, not dramatic
enough, you know?
so my spin on the idea:
- start with the solar system with realistic orbital parameters (phases are random)
- generate disruptions:
- some planets blow up, launching their pieces all over the place
- heavy “visitor” bodies come and g r a v i t a t e
- let it run for a while while making some effort to focus the camera on interesting parts
(the last part is the least developed, i want to make the camera much more cinematic in the future)
- make it more ~~~epic~~~ by adding sounds, specifically algorithmic sci-fi-ish music taken from
Wreckage System stream by 65daysofstatic (tl;dr:
it’s a live broadcast of generatively composed music).
here’s an example of the simulation (it is a randomly chosen video from a 2-year archive, so if you
don’t like what you see, just refresh the page; some videos lack sound because my sound scraping code
was broken for a while):
technical details
- simulation uses
scipy
’s solver for matrix-form Newton’s law
(again, inspired by this project)
- animation is done in
matplotlib
- sounds are added using
ffmpeg
notable realizations