From 3348733034339133e453294c1df5a85327d1bcec Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Mon, 11 Mar 2019 10:31:09 -0700 Subject: [PATCH] Tweak cooling. --- src/sankey.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sankey.js b/src/sankey.js index 2e0f4ef..a6240be 100644 --- a/src/sankey.js +++ b/src/sankey.js @@ -229,8 +229,8 @@ export default function Sankey() { const columns = computeNodeLayers(graph); initializeNodeBreadths(columns); for (let i = 0; i < iterations; ++i) { - const alpha = Math.pow(0.99, i); - const beta = (i + 1) / iterations; + const beta = ((i + 1) / iterations) ** 1.5; + const alpha = 1 - beta; relaxRightToLeft(columns, alpha, beta); relaxLeftToRight(columns, alpha, beta); }