Search code examples
graph-theoryterminologyheuristicsweighted-graph

Is there a name for this weighted graph visualisation using springs and charges?


Problem: Display a graph such that the lines drawn aren't too long and all over the place.

Solution: Set up some initial position of the points. Consider the points point masses with a charge. The connections are Hookean springs. Then, apply Newton's laws and some drag and let the system settle into some local minimum.

Example implementation: here (in the grey faces - connect and see how they move). I also set up a version with different connection weights here to solve a completely different problem - finding some similarity measure between objects that takes into account transitive connections (i.e., A is related to C, even though there is little or no connection between them, because they are connected to a common element B).

Question: I'm sure that I have already seen this demonstration many times, but I don't know what to search for. Does this algorithm (or something like it) have a name?


Solution

  • The keyword turns out to be Force-directed graph drawing.