parallelize repulsion forces using openmp

This commit is contained in:
2026-02-18 02:08:46 +01:00
parent 43c9a5b715
commit e2e75204ef
8 changed files with 84 additions and 62 deletions

View File

@ -4,15 +4,15 @@
#include <raylib.h>
// Window
constexpr int WIDTH = 1000;
constexpr int HEIGHT = 1000;
constexpr int WIDTH = 1300;
constexpr int HEIGHT = 1300;
// Camera Controls
constexpr float SIM_SPEED = 4.0;
constexpr float CAMERA_DISTANCE = 4.0;
constexpr float MIN_CAMERA_DISTANCE = 2.0;
constexpr float MAX_CAMERA_DISTANCE = 50.0;
constexpr float ZOOM_SPEED = 1.0;
constexpr float MAX_CAMERA_DISTANCE = 150.0;
constexpr float ZOOM_SPEED = 1.5;
constexpr float PAN_SPEED = 1.0;
constexpr float ROT_SPEED = 1.0;
@ -20,7 +20,7 @@ constexpr float ROT_SPEED = 1.0;
constexpr float SPRING_CONSTANT = 1.5;
constexpr float DAMPENING_CONSTANT = 0.8;
constexpr float REST_LENGTH = 1.0;
constexpr float REPULSION_FORCE = 0.05;
constexpr float REPULSION_FORCE = 0.1;
constexpr float REPULSION_RANGE = 3.0 * REST_LENGTH;
constexpr float VERLET_DAMPENING = 0.01; // [0, 1]