diff options
author | David Robillard <d@drobilla.net> | 2014-01-07 00:50:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-01-07 00:50:00 +0000 |
commit | d6e320663b67faab969604be2aa818a1b42e87b9 (patch) | |
tree | 576449e8635c8e37629bdc5c4f0d81314e65d626 | |
parent | 6e6fd7e4242e66e1a579376d8594e78fb0c80c81 (diff) | |
download | ganv-d6e320663b67faab969604be2aa818a1b42e87b9.tar.gz ganv-d6e320663b67faab969604be2aa818a1b42e87b9.tar.bz2 ganv-d6e320663b67faab969604be2aa818a1b42e87b9.zip |
Twiddle physics to reduce oscillation.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5291 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r-- | src/Canvas.cpp | 3 | ||||
-rw-r--r-- | src/fdgl.hpp | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/Canvas.cpp b/src/Canvas.cpp index 9d4558f..1fdcfb3 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -824,7 +824,6 @@ GanvCanvasImpl::layout_calculate(double dur, bool update) apply_force(node, partner, edge_force(dir, preg.pos, reg.pos)); } - /* Add tide force which pulls all objects as if the layout is happening on a flowing river surface. This prevents disconnected components from being ejected, since at some point the tide force will be @@ -851,7 +850,7 @@ GanvCanvasImpl::layout_calculate(double dur, bool update) GanvNode* const node = *i; - static const float damp = 0.2; // Velocity damping + static const float damp = 0.3; // Velocity damping if (node->impl->grabbed || !node->impl->connected) { node->impl->vel.x = 0.0; diff --git a/src/fdgl.hpp b/src/fdgl.hpp index 7d3d364..d2fb17a 100644 --- a/src/fdgl.hpp +++ b/src/fdgl.hpp @@ -16,9 +16,9 @@ #include <float.h> #include <math.h> -static const double CHARGE_KE = 4000000.0; -static const double EDGE_K = 64.0; -static const double EDGE_LEN = 1.0; +static const double CHARGE_KE = 2000000.0; +static const double EDGE_K = 32.0; +static const double EDGE_LEN = 0.1; struct Region { Vector pos; |