-
Posts
3052 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
News
Forums
Blogs
Gallery
Events
Everything posted by KaladinsSenseOfHumourSpren
-
So I have a (mostly) working 2D JS gravity simulation.
Now I'm trying to create a solar system in it, but it keeps falling apart.
I can get a stable system with a star and one planet, but as soon as I add a second planet, one of three things happen:
a) The planets collide
b) One of the planets crashes into the star
c) One of the planets gets ejected from the system
So I took a break from that and instead tried creating a star-planet-moon system. Faced the same problem; the moon either crashed or escaped its planet.
Though perhaps this is because the mass of the 'star' is only 31 times that of the planet, which makes it too much like the 3-Body Problem.
- Show previous comments 11 more
-
-
I meant the velocities are proportional
But looking at my code, I don't think I wrote it right...
I have school soon, so when I get back I'll fix that
Quotealso their acceleration should be in opposite directions,
Yeah, but if one of the objects is more massive than the other, then the smaller body gets more velocity
I'll post the code later, I need to clean it up
-
