title: Understanding Javascript D3 visualization quadtree
body: <p>I am trying to use and understand the <a href="http://mbostock.github.com/d3/" rel="nofollow">D3 visualization library</a> (http://mbostock.github.com/d3/), and I am looking at <a href="https://github.com/mbostock/d3/blob/master/d3.layout.js#L233" rel="nofollow">their force directed code</a> and it seems they are using a quadtree to calculate the force on a particle. The code is </p>
  
  <pre><code>      var k = kc * quad.count * dn * dn;
        node.px -= dx * k;
        node.py -= dy * k;
  </code></pre>
  
  <p>where it seems thay quad.count is the number of particles in the quadtree node. But looking at their <a href="https://github.com/mbostock/d3/blob/master/d3.geom.js#L696" rel="nofollow">quadtree code</a> in <a href="https://github.com/mbostock/d3/blob/master/d3.geom.js#L696" rel="nofollow">https://github.com/mbostock/d3/blob/master/d3.geom.js#L696</a>, I can't find any reference to <code>count</code>, 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.</p>