Page 1 of 1

Planetary simulations

Posted: Tue Apr 21, 2015 2:16 am
by guilhermevpr
I've been in contact in bullet sdk for a while and now I'm wondering if bullet is a good choice to simulate planets, objects in orbit, and differents types of rockets?

Thank you.

Re: Planetary simulations

Posted: Thu Apr 23, 2015 3:55 pm
by drleviathan
Yes, I believe Bullet could perform planetary simulations with decent accuracy, however if you're using true solar system units then you definitely need to compile Bullet with double precision otherwise floating point errors will be too big.

Re: Planetary simulations

Posted: Tue Apr 28, 2015 6:34 am
by Basroil
drleviathan wrote:Yes, I believe Bullet could perform planetary simulations with decent accuracy, however if you're using true solar system units then you definitely need to compile Bullet with double precision otherwise floating point errors will be too big.
It certainly can be reasonable, but bullet is inherently a 2 body physics set up, and things like an asteroid belt or densely populated solar system will be incredibly slow and quite inaccurate even with double precision (after enough steps).

If you make a few assumptions, i.e gravity goes in one direction, and any body is affected only by one body within some influence region (or a few if the rocket is the only thing moving), you can get realistic (but inaccurate) simulations that run very fast (and then you can adjust the influence sphere size to get better results while still being run at interactive speeds). If you're designing a game, the tradeoff is almost always worth it and bullet can be a great tool, but if you need realistic trajectory calculations you'll need to find a more robust solution.