Skip to content

Commit

Permalink
Tweak cooling.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Mar 11, 2019
1 parent 327038c commit 3348733
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sankey.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 3348733

Please sign in to comment.