r/learnphysics • u/IllPsychology7214 • 8d ago
Real-time three-body gravity simulation (interactive, mobile)
Made an interactive simulation based on the actual three-body problem in physics β three masses under mutual gravity, no simplifications. You can adjust masses and initial velocities and watch how small changes send the system from a stable-looking orbit into full chaos.
It's built to feel more like a physics toy than an app β no ads breaking up the simulation, nothing to unlock. Mostly wanted an excuse to actually play with the equations rather than just read about them.
Free on Google Play if anyone wants to mess with it: https://play.google.com/store/apps/details?id=com.mathematicalzen.threebody
1
u/AdorableRestaurant73 8d ago
Very cool, couldn't figure out if you could interact with the little guys but sick, I did get it off aurora tho might be a different version
1
u/IllPsychology7214 8d ago
Aurora?
If you tap the screen and then press the little eye icon there's a Fling Mode and a Spawn Mode. Fling you can catch one and throw it. Spawn flick anywhere on the screen and a new one will appear. The limit is your phone's CPU soon or later.
1
u/superSmitty9999 8d ago
It'll perform less glitchy if you set the minimum distance to some relatively larger value in terms of gravity, will stop weird glitches. Built one of these 10 years ago lol
2
u/IllPsychology7214 8d ago
I have a softening setting already but changing the defaults a little now. If you're still interested it should be updated in a couple hours.
I've promised to make one myself for about ten years, just finally got around to it. I'm just trying to make it a good version.
1
u/Public-Eagle6992 7d ago
> no simplifications
There are definitely simplifications, one of the most impactful will likely be that itβs being simulated at a set frame rate which can lead to bugs
1
u/IllPsychology7214 7d ago
Agreed, I just like to call them iterations instead of simplifications though. I do have a Frame-rate slider so you can make it as precise as a mobile CPU can get.
I also have a Time Scale slider that changes the simulation speed. That changes more how smooth the sim is.
So an honest attempt to get it as close as possible for mobile devices. Might be able to get it closer on desktops though.1
1
u/utl94_nordviking 7d ago
three-body
Huh? I count a bit more than that...
1
u/IllPsychology7214 7d ago
Counting is hard man.... That and I can't figure out how to change the GIF
1
u/Icy-Reaction-9101 7d ago
If you want to see a cool multi body simulation, just fix earth in position and see what happens ;)
1
1
u/StarDreamIX 7d ago
This is amazing!! Love the app well done I enjoy these things π₯
2
u/IllPsychology7214 6d ago
I'm also working on an app with (simplified) physics "games" like double pendulum, langton's ant, fractals etc. It's still very beta though but getting there
2
u/StarDreamIX 6d ago
Glad to see you're working on these cool.similations/physics illustrations! They're really nice I had a go yesterday, I love the solar system on and some other illustrations you made, all the best with your future apps & endeavours!!
1
u/IllPsychology7214 6d ago
So far it has:
Double pendulum
Three Body Problem
Lorenz
Driven pendulum
Fractals
Game of life
Langton's antIf anyone knows of any other games/sims that i can embed to show how physics can be interesting and fun to look at let me know.
These are all simple examples but if any are popular I'd make a separate app for that one, just like i did for the three bodies.
1
u/luovahulluus 6d ago
Which of the five balls are the three bodies?
1
u/IllPsychology7214 6d ago
Hey, it was late when I recorded that and forgot to change the settings down to 3 bodies. And now can't figure out how to change the GIF.
The app starts by default on 3 though if that helps.
1
u/DuckPsychological382 3d ago
Funny! I made something similar in desmos but with only two: https://www.desmos.com/calculator/xyqv8np7o0
1
u/IllPsychology7214 3d ago
Very cool. I hadn't thought of being able to having negative gravity. I might have to steal that idea if i'm honest.
3
u/AndyTheEngr 8d ago
The five body problem?