Download O2 Graph User Manual
Transcript
4 Layout Managers layout is vertical, this is the minimum vertical distance between a node and its parents. 4.4 The spring layout manager The spring layout manager uses a spring model to display an arbitrary graph which is reshaped whenever a link or node is added, deleted or moved. All other links or nodes move to compensate for a change and an animation feature enables you to watch the process. The reshaping rules are based on spring dynamics calculations. A distance d is defined over the graph nodes: the distance between two nodes is the shortest path length. Directly connected nodes have a distance of 1, and nodes in different unconnected components have an infinite distance. Each node pair with a finite distance d is linked by a spring whose strength is proportional to 1/d2 . The dynamic system of nodes and springs is stable when the distance between each node pair is L times the graph-distance between the nodes; L is the unit length and is specified in the length resource. When the system is stable, its energy is zero. When the system is unstable, the strengths of the springs determine a state with locally minimal energy. The graph is brought to a minimal energy each time the graph is changed. This is done by an incremental algorithm that takes each node to a stable position one by one until the energy changes by less than an epsilon between two algorithm iterations. This value is specified in the epsilon resource. At each stage, the node with the highest energy is moved. The graph is dynamically reconfigured when nodes and links are added and deleted. When a node is moved or created, that node is pinned to where you placed it, and the other nodes move around it.1 The animation feature that displays the successive states of the resolution as feedback. You can therefore easily follow layout modifications. It is also valuable when the graph is large and the reshaping takes a long time. The following table lists the graphic resources for a graph mask using the lk_specific function and the spring layout, either in a resource file 1. If this were not the case, the node just moved would be the one with the highest energy, and would simply be tugged back to its initial position straight away. 34 O2 Graph User Manual