From d6e320663b67faab969604be2aa818a1b42e87b9 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 7 Jan 2014 00:50:00 +0000 Subject: Twiddle physics to reduce oscillation. git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5291 a436a847-0d15-0410-975c-d299462d15a1 --- src/Canvas.cpp | 3 +-- src/fdgl.hpp | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src') 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 #include -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; -- cgit v1.2.1