d3/d3-force

Go back to position Verlet?

mbostock opened this issue · 1 comments

When this module was broken out for D3 3.x, we switched from position to velocity Verlet. I believe the idea was to avoid certain ordering effects and instabilities as a result of forces incrementally modifying node positions as they ran. However, the new force layout feels… more sluggish than the old one. Here’s an example:

https://bl.ocks.org/mbostock/7881887
https://observablehq.com/@d3/clustered-bubbles-2

Going back to the D3 3.x method of integration would be disruptive (for custom forces), but it’s worth considering.

Fil commented

I don't notice any sluggishness nor a big difference in the time to reach an arbitrary energy threshold?
See https://observablehq.com/d/5a863352b0e1c1a7

It seems possible for each force to decide on offering a choice as .method("velocity" || "position")