문제

I am trying to use and understand the D3 visualization library (http://mbostock.github.com/d3/), and I am looking at their force directed code and it seems they are using a quadtree to calculate the force on a particle. The code is

      var k = kc * quad.count * dn * dn;
      node.px -= dx * k;
      node.py -= dy * k;

where it seems thay quad.count is the number of particles in the quadtree node. But looking at their quadtree code in https://github.com/mbostock/d3/blob/master/d3.geom.js#L696, I can't find any reference to count, and how it is being calculated. I ask because I want to modify some things to perhaps change the "weight" or "charge" of each node.

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top