@taby Cool. Thanks. I'll come back to this after I finish doing the UI! Thanks.
Gravitational acceleration calculation
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.
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.