Kamada-Kawai Force Directed Layout
-
Compute layout for simple (no loops, no multiedges) undirected networks
(makes directed edges undirected).
-
The geometric distance between pairs of nodes should reflect the graph-theoretic distance (shortest path length)
between them. Kamada-Kawai wrote: We regard the desirable geometric (Euclidean) distance between two vertices
in the drawing as the graph theoretic distance between them in the corresponding graph.
-
The layout uses a spring model, where for each pair of nodes a spring is defined with an ideal length
proportional to the graph-theoretic distance between the nodes, and a stiffness inversely proportional to
the inverse of the square of the graph-theoretic distance.
-
We compute the layout by simulating a spring system with a damping term to reach a steady state.
The integration is done with Verlet integration, which is a symplectic integrator that is
more stable than Euler integration.