As mentioned in the section 0, algorithms to
automatically generate flow maps first create a flow
map tree and then use such structure to generate the
flow map. In this work, flows are generated directly
using a force-directed approach without creating a
tree structure at priori. The only structure necessary
is composed by the edges that start from the origin
and arrive to the target nodes.
This work has the objective of achieving
automatic generation of flow-maps, which are
created in a natural way, with high visual quality.
In particular we want to satisfy the following
aesthetic criteria, which are a common goal of
previous works as well (Phan, et al., 2005),
(Verbeek, et al., 2011):
1. The possibility of aggregate flows, reducing
the visual clutter.
2. The use of smooth curves for aesthetic
purposes.
3. The flow magnitude affects the layout of the
generated map; straight lines are correlated
to nodes with high magnitude.
4. The target nodes are not overlapped with
flows.
5. The flow is crossing-free.
In contrast to previous works, this paper presents
a novel force-directed algorithm to automatic
generate flows maps that satisfy the aforementioned
criteria and that is intuitive: imagine a pavement
with a set of elastic cords, tied on one side to a
common stake, and on the other side to different
strakes placed over the pavement. Every cord has a
different elasticity. In this example, we attempt to
aggregate these cords. Hence, we start from the
strake where all cords are tied and we try to bind
together near cords; those with higher elasticity are
dragged by the ones with less elasticity. However,
we have two criteria that are not satisfied: elastic
cords do not have smooth appearance and they
might collide with stakes. These are two issues of
our algorithm that shall be addressed in the
following sections.
The implemented method is divided in different
steps (see
Figure 3).
3.1 Basic Structure Generation
In order to aggregate flows that initially are straight
lines (see Figure 6a), we use a subdivision technique
to divide each flow line into a set of smaller
segments, hence creating new intermediate nodes.
However, not all initial flow lines end up with same
number of intermediate nodes. The number of
intermediate nodes generated for the flow is
proportional to the distance to the target. Each
intermediate node has an index, called “node index”
that defines the order. Nodes having the same “node
index” maintain the same distance from the origin
(see
Figure 6b). The idea is to aggregate the node
with the same “node index”.
At this step each intermediate node has one
father node and one child node. The flow magnitude
will be assigned to each intermediate node, thus each
intermediate node has the flow magnitude of its
flow.
Each intermediate node also knows which are the
two intermediate nodes with the same node index
that belong respectively to the previous and
following flow taking into account the clockwise
order. We define these two intermediate nodes as
“near nodes”.
3.2 Force-directed Algorithm
This phase is divided into two crucial steps,
executed every iteration.
3.2.1 Nodes Merging
This phase is responsible for the update of the flow
tree that becomes obsolete after merging the nodes,
having the same node index, the same father and
within a certain distance.
Another mandatory condition is that the two
nodes are “near nodes” with each other. In this way
crossing between flows cannot occur. This satisfies
the criterion 5, for example looking at the Figure 6
the nodes that belong to the flow N can only merge
with the nodes of flow M, as well as the nodes of the
flow Q. Meanwhile the nodes of the flow M can
merge both with the nodes of flow N and Q.
When the merge event occurs, the two nodes will
be removed and a new node is created to represent
their merge (see Figure 6c). The condition of having
the same father is required to maintain the
consistence of the tree structure. The new node will
inherit the behavior of the two nodes merged.
Additionally, its flow magnitude will be the sum of
the two node’s magnitudes. Hence, at each iteration
two or more intermediate nodes are aggregated,
reducing the number of nodes and updating the tree
structure. This step satisfies the aesthetic criterion 1.
In fact merging the nodes that compose the structure
implies the merging of the flows.
ForceDirectedFlowMapLayout
173