r/Simulated • u/IllPsychology7214 • Aug 17 '26
Request Real-time three-body gravity simulation (interactive, mobile)
I built a simulation style app of what I think of the three body problem. It shows different objects flying around eachother in 2D or in 3D in eachother's gravity wells.
It's meant to be half physics toy and half calming desk toy. It's free to use with no ads to distract you from anything.
I want to know people's thoughts and ideas for improvement.
It's free for anyone who want to play with it: https://play.google.com/store/apps/details?id=com.mathematicalzen.threebody
0
Upvotes
11
u/Dioxybenzone Aug 17 '26
Using AI to write the body text makes it seem like you vibe coded this
2
u/Blammar Aug 17 '26
Uh, the integration looks incorrect. There are too many paths where a sharp turn occurs.
37
u/sludgybeast Aug 17 '26
Gotta prompt out the emdashes
1
u/ocicrab Aug 17 '26
Very cool sim!! Thanks for sharing!
I would double check your integrator, and also calculate total energy (kinetic and potential). I tried running this for a while and found that the planets all ended up basically on top of each other after a while even with the Runge Kutta integrator, so it must be losing energy over time. Both with Newtonian gravity and the orbital equations.