ForceAtlas2
created updated 167 words1 min read
- concepts
- cs
forceatlas2 is a way of deciding where to put the dots in a graph so it actually looks like something. it comes from the team behind Gephi, and they wrote it up in a paper in 2014 (Jacomy, Venturini, Heymann and Bastian).
it's a force-directed layout, which basically turns the graph into physics:
- every node pushes every other node away, like magnets with the same pole
- every link pulls its two nodes together, like a spring
- gravity pulls everything toward the middle so loose nodes don't drift off forever
run that for enough rounds and it settles. notes that link a lot end up in tight clusters, and unrelated stuff spreads out. nodes with lots of links push harder, so the big hubs get some breathing room.
for big graphs it can use the Barnes–Hut trick, which groups far-away nodes together instead of checking every single pair.
i use the graphology version, run 300 rounds at build time, see How I Built the Graph.