Note : This hasn’t been updated for almost 3 years… Have a look at Gravit
Download
Grab the latest version : List of downloadable files
If you’re like me this section is the first one you look for when you come to a software project website. « Show me the code ! » say the crowd, so here it is
Well, you may at least take a look at the Changelog before.
Or see what the older ones looked like : Archive
Then see what you might expect from future releases from the TODO file.
What is it ?
OpenGLavity is gravity simulator. It simulate gravitational interactions between N bodies with a direct N-bodies algorithm, which means that it calculates every interactions between every bodies, without any simplifications.
File format
The « universe » file used by OpenGLavity contains the definitions of all bodies :
<number of bodies>
<PositionX> <PositionY> <PositionZ> <Mass> <Density/Diameter> <SpeedX> <SpeedY> <SpeedZ> <Color>
<PositionX> <PositionY> <PositionZ> <Mass> <Density/Diameter> <SpeedX> <SpeedY> <SpeedZ> <Color>
…
for example :
500
-14.636219 -11.663386 0.099144 100.000000 0.140000 -0.000605 0.004225 0.000000 0
-11.758823 -9.562407 -0.552011 100.000000 0.140000 0.005261 0.006437 0.000000 0
-11.095439 -13.773222 -0.221400 100.000000 0.140000 -0.006204 0.002451 0.000000 0
-9.272745 -9.182579 -0.534533 100.000000 0.140000 0.008827 -0.003532 0.000000 0
-11.990996 -8.901316 0.664987 100.000000 0.140000 0.004764 0.004519 0.000000 0
-5.551880 -14.653432 0.102336 100.000000 0.140000 -0.002205 -0.002684 0.000000 0
-6.193612 -7.124469 0.693497 100.000000 0.140000 0.002585 -0.002538 0.000000 0
-6.297736 -11.790220 0.286008 100.000000 0.140000 -0.001097 -0.005137 0.000000 0
-10.779373 -6.934628 0.542607 100.000000 0.140000 0.004665 0.000894 0.000000 0
…
Screenshot
Installation
You may want to edit the Makefile to make it fits your needs
then :
make
There’s not yet a ‘make install’ rule
Requirements
To compile you’ll need : a C compiler and :