Orthogonal 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 are more or less compact. Finally, we show how to customize the drawing according to your special requirements


A simple strategy

If you want to construct an orthogonal drawing of a graph with BLAG, simply do the following:

An example of orthogonal drawing constructed with the previous steps is shown in the following figure.

 

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.

This replaces the default algorithm for orthogonalization with a faster one.

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.

You will obtain drawings that are much better in terms of number of bends along edges. On the other hand you will have worse time performance. An orthogonal drawing constructed with code 2 of the same graph of the previous figure is shown below.

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:

In this case BLAG will use the compaction strategy number 3. Usually, the best strategies, from the aesthetics point of view, are 2, 3, 6, and 7. On the other hand they are more time consuming than 0, 1, 4, and 5. Strategies 3 and 7 are strongly recommended for applications where having very compact drawings is a strict requirement.

 

Drawing customization

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.

An example of orthogonal drawing constructed with a nodes 0, 5, and 6 on the same face is shown in the following figure.

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.

A very useful feature of the new GDT release is the possibility of constraining each node of an orthogonal drawing to have a prescribed size. For example, consider the following graph:

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.


Last update : July 31, 2002
Website design by INTEGRA Sistemi, www.IntegraSistemi.it