From b308ae521f19a41f0e7c59de2fe7b58ac443a74b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 11 Jan 2014 23:55:02 +0000 Subject: FDGL: Reduce oscillation. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5305 a436a847-0d15-0410-975c-d299462d15a1 --- src/Canvas.cpp | 2 +- src/fdgl.hpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 01e6296..27e3cab 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -832,7 +832,7 @@ gboolean GanvCanvasImpl::layout_calculate(double dur, bool update) { // A light directional force to push sources to the top left - static const double DIR_MAGNITUDE = -2000.0; + static const double DIR_MAGNITUDE = -1000.0; Vector dir = { 0.0, 0.0 }; switch (_gcanvas->direction) { case GANV_DIRECTION_RIGHT: dir.x = DIR_MAGNITUDE; break; diff --git a/src/fdgl.hpp b/src/fdgl.hpp index d2fb17a..b40f333 100644 --- a/src/fdgl.hpp +++ b/src/fdgl.hpp @@ -16,8 +16,8 @@ #include #include -static const double CHARGE_KE = 2000000.0; -static const double EDGE_K = 32.0; +static const double CHARGE_KE = 1000000.0; +static const double EDGE_K = 16.0; static const double EDGE_LEN = 0.1; struct Region { @@ -148,7 +148,7 @@ rect_distance(Vector* vec, inline Vector repel_force(const Region& a, const Region& b) { - static const double MIN_DIST = DBL_EPSILON; + static const double MIN_DIST = 1.0; Vector vec; double dist = rect_distance( -- cgit v1.2.1