Mr. Tree Layout Algorithm
This project is all about developing a tree layout algorithm. We pity the fool who doesn't use Mr. Tree Layout!
This page will over time be filled with documentation written by the project team. But first, here's some general information to get you started:
Project Team |
|
Project Goals | The following are our main goals for this project:
|
Plug-in Name | de.cau.cs.kieler.klay.tree |
Repository | KIELER Pragmatics |
Branches |
|
Page Contents
Mr. Tree is a layout algorithm for trees. It uses the algorithm from "A Node-Positioning Algorithm for General Trees, John Q.Walker II" to layout trees. To do this it uses four phases plus a pre-processing to build a corresponding data structure. The first phase "treeifying" transforms the given graph into a tree if necessary. To do this, edges which destroy the tree property will be removed and stored, so that they can be reinserted during a post processing. In the second phase "orderNodes" the nodes of each level are separated into leaves and inner nodes. And then whitespace in the level is filled with leaves. The third phase "NodePlacer" uses the algorithm first mentioned from John Q.Walker II to compute the actual position of the nodes. The last phase routeEdges sets the positions for the edges corresponding to the positions of the nodes.
Each phase uses intermediate processors for small computations on the graph. The corresponding processors are defined in each phase. Some are defined multiple times, but they are invoked only once between phases.
The processors can determine roots of components and fan outs or level neighbors of nodes.
Literature
Related publications:
- J. Q. Walker, II. 1990. A node-positioning algorithm for general trees. Softw. Pract. Exper. 20, 7 (July 1990), http://www.cs.unc.edu/techreports/89-034.pdf
- A. Rusu, Rowan University, Tree drawing algorithms, http://cs.brown.edu/~rt/gdhandbook/chapters/trees.pdf
- Kaufmann, M., & Wagner, D. (Eds.). (2001). Drawing graphs: methods and models (Vol. 2025). Springer.
Features
Mr.Tree is a layout algorithm that lays out a graph in a tree layout. It contains the following features:
- Support for connected components
- Support for node and edge labels
Some other features that can be thought of being implemented in the future:
- Support for graphs with cycles or other graphs that are hardly trees
- Support for ports
- Layout options for customizing the algorithm
- Different kinds of tree layouts (top-down tree, left-to-right tree, radial tree...)