Skip to content Skip to sidebar Skip to footer

Understanding Javascript D3 Visualization Quadtree

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 quadtre

Solution 1:

Take a look at the d3_layout_forceAccumulate method:

https://github.com/mbostock/d3/blob/master/src/layout/force.js#L294-324

The quadtree by itself doesn't compute the center of charge for its particles (because the quadtree only knows about particle positions, and doesn’t make any assumptions about their charges). After the quadtree is generated, the force layout recursively computes the center of charge for each quadrant.

Post a Comment for "Understanding Javascript D3 Visualization Quadtree"