star-sim

Barnes-Hut gravity simulation.
git clone git://git.amin.space/star-sim.git
Log | Files | Refs | README | LICENSE

commit 1d3ac75b8034c7ec9568ba65989cb56947ac519d
parent 0b74a8239c8ab979dbb95fa4813fd6c9c7e7c767
Author: amin <dev@aminmesbah.com>
Date:   Wed, 19 Apr 2017 17:55:17 +0000

Adjust settings so 'galaxies' form.

FossilOrigin-Name: 2989d95d94e24e57486dda381fe2e3c9dbcc2e5d7740df1950864306124c4f43
Diffstat:
Mmain.cpp | 4++--
Mstar.h | 2+-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/main.cpp b/main.cpp @@ -11,7 +11,7 @@ #define MAP_ANONYMOUS MAP_ANON #endif -#define TRAILS +//#define TRAILS //#define TOROID #define FULLSCREEN @@ -20,7 +20,7 @@ #define SCREEN_HEIGHT 480 #define BYTES_PER_PIXEL 4 #define NUM_STARS 200 -#define DRAG 1 +#define DRAG 0.994 #define SECOND 1000.0f #define FPS 60 diff --git a/star.h b/star.h @@ -4,7 +4,7 @@ #include <math.h> #include <stdint.h> -#define GRAVITATION 0.01f +#define GRAVITATION 0.1f struct Star {