
History įorce-directed methods in graph drawing date back to the work of Tutte (1963), who showed that polyhedral graphs may be drawn in the plane with all faces convex by fixing the vertices of the outer face of a planar embedding of the graph into convex position, placing a spring-like attractive force on each edge, and letting the system settle into an equilibrium.

Another technique to achieve a global minimum is to use a multilevel approach. For example, using the Kamada–Kawai algorithm to quickly generate a reasonable initial layout and then the Fruchterman–Reingold algorithm to improve the placement of neighbouring nodes. A combined application of different algorithms is helpful to solve this problem. The problem of poor local minima becomes more important as the number of vertices of the graph increases. For many algorithms, especially the ones that allow only down-hill moves of the vertices, the final result can be strongly influenced by the initial layout, that in most cases is randomly generated. The local minimum found can be, in many cases, considerably worse than a global minimum, which translates into a low-quality drawing. Poor local minima It is easy to see that force-directed algorithms produce a graph with minimal energy, in particular one whose total energy is only a local minimum. Force-directed algorithms, when combined with a multilevel approach, can draw graphs of millions of nodes. Edge attraction and vertex repulsion forces may be defined using functions that are not based on the physical behavior of springs and particles for instance, some force-directed systems use springs whose attractive force is logarithmic rather than linear.Īn alternative model considers a spring-like force for every pair of nodes ( i, j ) per iteration technique. In equilibrium states for this system of forces, the edges tend to have uniform length (because of the spring forces), and nodes that are not connected by an edge tend to be drawn further apart (because of the electrical repulsion). Typically, spring-like attractive forces based on Hooke's law are used to attract pairs of endpoints of the graph's edges towards each other, while simultaneously repulsive forces like those of electrically charged particles based on Coulomb's law are used to separate all pairs of nodes.

Force-directed graph drawing algorithms assign forces among the set of edges and the set of nodes of a graph drawing.
