Planetary simulations

Post Reply
guilhermevpr
Posts: 1
Joined: Tue Apr 21, 2015 2:13 am

Planetary simulations

Post 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.
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Planetary simulations

Post 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.
Basroil
Posts: 463
Joined: Fri Nov 30, 2012 4:50 am

Re: Planetary simulations

Post 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.
Post Reply