Sign in to follow this  

I finally (think) I figured out what is wrong with my planet gravity sim

Recommended Posts

I have been doing a simulation of the effects of inter-planetary gravity. The problem, I believe, doesn't lie with my algorithm (modeling the whole F=GMm/d^2 thing). Instead (there is no clipping), the planets, esp. when there are only two, get so close together that their distance is a tiny fraction of 1. Therefore, squared, it is even tinier, leading to them all of a sudden getting a sudden burst of speed, since it obviously isn't modeled in "perfect realtime", if you know what I mean. All of a sudden, their force jumps up astronomically, and they zoom away from each other, although in the direction they needed to move to get closer together - they overshoot. Any ideas on how to counteract this? This is supposed to be a realistic simulation (its for a physics project). But the main thing is that it looks realistic, which it certainly doesn't at this time. Thanks!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this