diff options
author | David Robillard <d@drobilla.net> | 2013-12-31 04:26:45 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2013-12-31 04:26:45 +0000 |
commit | b3ba7ad25ce0a6b76bcff21aaf1e8311b2198b4f (patch) | |
tree | ecc6fa3fd4bb911523213e1b9c9c8b9fbbeecbd5 /src | |
parent | 334a0f6e487e0a39e3329e339c8750ae91ac03f9 (diff) | |
download | ganv-b3ba7ad25ce0a6b76bcff21aaf1e8311b2198b4f.tar.gz ganv-b3ba7ad25ce0a6b76bcff21aaf1e8311b2198b4f.tar.bz2 ganv-b3ba7ad25ce0a6b76bcff21aaf1e8311b2198b4f.zip |
FDGL: Increase maximum simulation time to converge faster on larger graphs.
git-svn-id: http://svn.drobilla.net/lad/trunk/ganv@5238 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/Canvas.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Canvas.cpp b/src/Canvas.cpp index ca71017..b1d8900 100644 --- a/src/Canvas.cpp +++ b/src/Canvas.cpp @@ -741,12 +741,12 @@ apply_force(GanvNode* a, GanvNode* b, const Vector& f) gboolean GanvCanvasImpl::layout_iteration() { - static const double T_PER_US = .00001; // Sym time per real microsecond + static const double T_PER_US = .0001; // Sym time per real microsecond static uint64_t prev = 0; // Previous iteration time const uint64_t now = g_get_monotonic_time(); - const double time_to_run = std::min((now - prev) * T_PER_US, 1.0); + const double time_to_run = std::min((now - prev) * T_PER_US, 10.0); prev = now; @@ -768,7 +768,7 @@ GanvCanvasImpl::layout_calculate(double dur, bool update) static const double SPRING_K = 48.0; // A light directional force to push sources to the top left - static const double DIR_MAGNITUDE = -2800.0; + static const double DIR_MAGNITUDE = -2000.0; Vector dir = { 0.0, 0.0 }; switch (_gcanvas->direction) { case GANV_DIRECTION_RIGHT: dir.x = DIR_MAGNITUDE; break; @@ -838,7 +838,7 @@ GanvCanvasImpl::layout_calculate(double dur, bool update) const Vector mouth = { -100000.0, -100000.0 }; node->impl->force = vec_add( node->impl->force, - tide_force(mouth, reg.pos, 1000000000000.0)); + tide_force(mouth, reg.pos, 4000000000000.0)); FOREACH_ITEM(_items, j) { if (i == j || (!GANV_IS_MODULE(*i) && !GANV_IS_CIRCLE(*i))) { |