Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat algorithms does D3.js use for the force-directed graph?
    primarykey
    data
    text
    <p>I would be interested to know exactly what algorithms D3 uses to achieve the force-directed graph feature in the library. Having read <a href="http://www.cs.brown.edu/~rt/gdhandbook/chapters/force-directed.pdf" rel="nofollow noreferrer">Kobourov's summary</a> of the history of force-directed graphs left me a bit baffled as to what is the exact algorithm or method (combination of algorithms / heuristics) used in the library. </p> <p>D3 <a href="https://github.com/mbostock/d3/wiki/Force-Layout" rel="nofollow noreferrer">API reference</a> says Barnes-Hut algorithm is used to calculate the charges acting on bodies, an O(N*log(N)) operation. Kobourov's article mentions that Quigley-Eades algorithm, and Hu's algorithm are multilevel algorithms that make use of Barnes-Hut. Is one of them utilized in some way in D3? </p> <p>The API wiki futher says Verlet integration is used for particle positioning. The <a href="https://github.com/mbostock/d3/blob/master/src/layout/force.js" rel="nofollow noreferrer">source code</a> mentions Gauss-Seidel algorithm, which in turn is mentioned both in <a href="http://www.mathematica-journal.com/issue/v10i1/contents/graph_draw/graph_draw.pdf" rel="nofollow noreferrer">Hu's algorithm</a> and Dwyer's <a href="http://www.csse.monash.edu.au/~tdwyer/Dwyer2009FastConstraints.pdf" rel="nofollow noreferrer">graph layout paper</a>. I guess the question I'm looking an answer to is what "integrative" algorithm D3 utilizes; Kobourov's article lists several and D3 force-directed features don't directly seem to fit any of those.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload