D3 force layout repulsive charge formula

Is there a way to change the formula D3 used to calculate the charge repulsive force in a power arrangement?

It was previously indicated that the charging force D3 follows the inverse square law . But I want the force to decay even faster, as the distance between the nodes increases. I want to make the formula behave like something more than charge/distance^3or charge/distance^4, so that the nodes will significantly repel each other when they are very close to each other.
+4
source share
1 answer

, . , , repulse.

var k = quad.charge * dn * dn;

var k = quad.charge * dn * dn * dn;
+4

All Articles