|
Force-directed layout schemes are usually selected for undirected graphs, this being ideal for simulating physical and chemical models. aiSee combines the following four ideas in its force-directed layout algorithm: Spring forcesA spring embedder
is simulated. The nodes of a graph are regarded as electrically charged
particles that repel one another, the edges being regarded as springs
connecting the particles. Particles that are far away from one another
attract each other by spring forces, particles that are too close
repel one another.
(See graph attributes
Magnetic forcesSpring forces do not take the direction of edges into account. In
directed graphs all edges should have a uniform direction to point in.
Here the edges are interpreted as magnetic needles that align themselves
according to a magnetic field.
(See graph attributes
Gravitational forcesThe problem with spring forces is that they are only effective in
connected graphs. In unconnected graphs simulating a spring embedder
makes unconnected nodes move away from one another as there are only
repulsive forces but no attractive forces. That is why gravitational
forces are introduced. All nodes are attracted to the bary center of
all the other nodes.
(See graph attribute
Simulated annealingThe simulated annealing model is oriented to the physical process of
annealing, which often leads to very regular structures (e.g. like
crystals). A global energy level is computed for a graph which is the
sum of all energy levels of the nodes. The energy level at a node is
determined from the forces acting on it, much like the elongation of the
springs. The spring embedder tries to minimize the global energy level
by moving the nodes in the direction of the forces. In addition, nodes
are randomly moved so as to avoid being trapped at a local energy minimum.
At the beginning this is done more vigorously, with random movement being
ceased towards the end in order to stabilize the final layout. The amount
of random movement depends on the “temperature”, which is controlled by
a temperature scheme. aiSee also supports the concept of local
temperatures for a node. The temperature takes the local situation of
the graph into account (see The force-directed placement algorithm consists of four phases:
The two iteration phases are conceptionally the same. They
simply sequentially simulate the two magnetic fields acting on the system
(see graph attribute In the final improvement phase, the node positions can be rastered. This is done by moving a node to its closest raster point after each iteration step. Afterwards, the minimum aiSee offers the option of animating
its internal force-directed layout calculations. Simply use
the command-line option |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Name | Default value | Attribute of |
|---|---|---|
attraction |
60 |
graph |
border X |
600 |
graph |
border y |
600 |
graph |
energetic |
no |
graph |
energetic attraction |
70.0 |
graph |
energetic border |
70.0 |
graph |
energetic crossing |
80.0 |
graph |
energetic gravity |
0.3 |
graph |
energetic overlapping |
80.0 |
graph |
energetic repulsion |
70.0 |
graph |
fdmax |
300 |
graph |
gravity |
0.0625 |
graph |
ignore_singles |
no |
graph |
magnetic_field1 |
no |
graph |
magnetic_field2 |
no |
graph |
magnetic_force1 |
1 |
graph |
magnetic_force2 |
1 |
graph |
priority |
1 |
edge |
randomfactor |
70 |
graph |
randomimpulse |
32 |
graph |
randomrounds |
-1 |
graph |
repulsion |
60 |
graph |
tempfactor |
1.3 |
graph |
tempmax |
128 |
graph |
tempmin |
1 |
graph |
tempscheme |
1 |
graph |
temptreshold |
3 |
graph |
For more details on aiSee’s force-directed layout algorithm, see [Sa96].