🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Gravitational acceleration calculation

Started by
143 comments, last by taby 1 year, 10 months ago

@taby Cool. Thanks. I'll come back to this after I finish doing the UI! Thanks.

None

Advertisement

I should have my copy of Galactic Dynamics in hand tomorrow morning. Then we will get to the bottom of this galactic simulation.

@taby, Just for more info. I created the galaxy sim by writing a script for the solar system sim that would periodically output the ‘planets’ position and velocity. I used this data to hydrate the initial galaxy simulation. So the only difference between the two simulations is that there are more ‘planets’/'stars' in on than in the other.

None

Right. Well, there are falloff functions that are used to describe the mass density. It's these data that you use to initialize the galaxy in terms of point particles. Like, say the density is 0.5 at location x, then one gets a uniform random variable in the range of [0, 1], and if that value is less than than 0.5, then a star belongs there. Repeat 10,000,000 times for various x, or repeat until y stars are made.

In the meantime, check out:

https://arxiv.org/abs/1307.8215

Why are you doing this?

My buddy forgot to bring the book. :( There’s always tomorrow.

jonny-b said:
The problem I'm facing is that, as star one approaches the static object it's is accelerating as expected and when it passes the object I expect the velocity to slowly bleed to zero and the star to fall back in.

Orbital dynamics does not work like that. Go play Kerbal Space Program until you get some intuition about how that works.

There is something called escape speed.

You cannot reach escape velocity with gravity alone in a two-body situation. You may get a very elongated elliptical orbit, like a comet, but not an escape.

This topic is closed to new replies.

Advertisement