|
Orthogonal DrawingsOrthogonal drawings have an impressive range of applicability. In what follows we show how to use BLAG for constructing orthogonal drawings. First, we present a simple strategy, suitable for beginners (but still powerful enough to cover several applications). Second, we show how to work if performance is more important than aesthetics. Third, we describe how to behave if aesthetics are more important than performance. Fourth, we show how several choices are available for constructing drawings that moarere or less compact. Finally, we show how to customize the drawing according to your special requirements If you want to construct an orthogonal drawing of a graph with BLAG, simply do the following:
If performance is more important than aesthetics If you have strict performance requirements, then you can change the configuration file shown above to obtain drawings that are slightly worse either in terms of number of bends along edges or in terms of global area occupied by the drawing. On the other hand you will have better time performance. GDT offers several facilities to explore the performance/effectiveness trade-off. For example, if you accept to have more bends that those that are strictly needed, you can replace the above configuration file with the following one.
<BEGIN_OPTIONS> <ALGORITHM> 0 </ALGORITHM> <END_OPTIONS> Note: the current version of GDT allows to apply code 0 only to graphs that are biconnected and whose nodes have at most four incident edges. A graph is biconnected if the removal of one node is not sufficient to cut it into two (or more) disconnected pieces.
If aesthetics are more important than performance If you have strict aesthetics requirements, you can replace the above configuration file with the following one.
<BEGIN_OPTIONS> <ALGORITHM> 2 </ALGORITHM> <END_OPTIONS> Note: the current version of GDT allows to apply code 2 only to graphs that are biconnected. A graph is biconnected if the removal of one node is not sufficient to cut it into two (or more) disconnected pieces. Note: code 2 causes the invocation of a branch and bound algorithm, that is potentially exponential in time requirement. This makes it unsuitable for graphs with more that 100 vertices. Drawing compaction Several strategies are available for compacting orthogonal drawings. They have assigned an integer number in the interval 0 - 7. If no specification is given, then compaction 7 is applied as a default. If you want to force BLAG to use a certain compaction strategy, different from 7, you have to specify it as follows:
<BEGIN_OPTIONS> <ALGORITHM> 1 </ALGORITHM> <COMPACTION> 3 </COMPACTION> <END_OPTIONS> If you need to customize your drawing, then you can exploit the capability of GDT in handling user-specified constraints. For example, if you want that all the nodes of a certain set (say 0, 5, and 6) are drawn in the same face (say with dummy label 1), then you can replace the above configuration file with the following one.
<BEGIN_OPTIONS> <ALGORITHM> 1 </ALGORITHM> <CONSTRAINTS>
<NODE> 5 1 <NODE> 6 1 <END_OPTIONS> As another example, if you want to emphasize an edge (say edge 8) that for some reason is expecially important, then you might want to preserve it to have crossings and maybe to have bends. This is done very easily by replacing the above configuration file with the following one.
<BEGIN_OPTIONS> <ALGORITHM> 1 </ALGORITHM> <CONSTRAINTS>
<BENDS>
<END_OPTIONS> We can choose to draw it orthogonally, with the constraint that node 8 has width=1 and height=1, and node 2 has width=1 and height=3. The lengths are in terms of integer grid points. If not constrained, each node has width=height=0.
<BEGIN_OPTIONS> <ALGORITHM> 1 </ALGORITHM> <CONSTRAINTS>
<NODE_DIM NODE_ID="2" WIDTH="1" HEIGHT="3" /> <END_OPTIONS>
Polyline drawingsBLAG provides polyline layout algorithms. If you want to construct a polyline drawing of a graph with BLAG, simply do the following:
Note: the current version of GDT allows to apply code 7 only to graphs that are biconnected. A graph is biconnected if the removal of one node is not sufficient to cut it into two (or more) disconnected pieces. Examples of polyline drawings constructed with the previous steps are shown in the following figure.
Several strategies are available for producing polyline drawings that are more or less compact. They have assigned an integer number in the interval 0 - 7. If no specification is given, then compaction 7 is applied as a default. If you want to force BLAG to use a certain compaction strategy, different from 7, you have to specify it as follows:
<ALGORITHM> 7 </ALGORITHM> <COMPACTION> 3 </COMPACTION> <END_OPTIONS> Upward drawingsUpward drawings can be used in several applications, for example to draw Petri Nets or SADT diagrams. BLAG considers a more general model of upward drawing, in which some feedback edges are allowed when an upward drawing does not exist for the given graph. We call such a model "quasi-upward" drawing. In a quasi-upward drawing we call "bend" a point in which a feedback edge is tangent to the horizontal line through this point. In what follows we show how to use BLAG for constructing quasi-upward drawings.First, we present a simple strategy, suitable for beginners (but still powerful enough to cover several applications). Second, we describe how to behave if aesthetics are more important than performance. Finally, we show how to customize the drawing according to your special requirements A simple strategy If you want to construct a quasi-upward drawing of a graph with BLAG, simply do the following:
If aesthetics are more important than performance If you have strict aesthetics requirements, you can replace the above configuration file with
the following one.
<ALGORITHM> 4 </ALGORITHM> <END_OPTIONS>
Note: the current version of GDT allows to apply code 4 only to graphs that are biconnected. A graph is biconnected if the removal of one node is not sufficient to cut it into two (or more) disconnected pieces. Note: code 2 causes the invocation of a branch and bound algorithm, that is potentially exponential in time requirement. This makes it unsuitable for graphs with more that 100 nodes. If you need to customize your drawing, then you can exploit the capability of GDT in handling user-specified constraints. For example, if you want that all the nodes of a certain set (say 0, 5, and 6) are drawn in
the same face (say with dummy label 1), then you can replace the above configuration file
with the following one.
<ALGORITHM> 3 </ALGORITHM> <CONSTRAINTS>
<NODE> 5 1 <NODE> 6 1 <END_OPTIONS>
<ALGORITHM> 3 </ALGORITHM> <CONSTRAINTS>
<BENDS>
<END_OPTIONS> Visibility drawingsBLAG provides several visibility layout algorithms. If you want to construct a visibility drawing of a graph with BLAG, simply do the following:
Note: the current version of GDT allows to apply code 8 only to graphs that are biconnected. A graph is biconnected if the removal of one node is not sufficient to cut it into two (or more) disconnected pieces. An example of visibility drawing constructed with the previous steps is shown in the following figure. You can also apply an algorithm to draw directed graphs using "visibility-upward" layouts. Use for example the following file configuration:
<ALGORITHM> 5 </ALGORITHM> <END_OPTIONS>
Several strategies are available for producing visibility drawings that are more or less compact. They have assigned an integer number in the interval 0 - 7. If no specification is given, then compaction 7 is applied as a default. If you want to force BLAG to use a certain compaction strategy, different from 7, you have to specify it as follows:
<ALGORITHM> 8 </ALGORITHM> <COMPACTION> 3 </COMPACTION> <END_OPTIONS> Tree drawingsIn what follows we show how to use BLAG for constructing drawings of trees.If you want to construct a tree drawing with BLAG, simply do the following:
|
Last update: February 08, 2008