Changes for page KIML Layout Options

Last modified by Alexander Schulz-Rosengarten on 2023/09/11 16:17

From version 19.1
edited by msp
on 2014/03/08 20:04
Change comment: There is no comment for this version
To version 21.1
edited by msp
on 2014/03/08 21:51
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,8 +1,6 @@
1 -{{warning}}
2 -This is preliminary and incomplete documentation. You've been warned.
3 -{{/warning}}
1 +
4 4  
5 -KIML defines a whole set of standard layout options that many layout algorithms support. Whether an algorithm supports a layout option depends on the option and on the algorithm. When an option is supported by an algorithm, that algorithm may override the option's default value. Algorithms may also provide more specialized documentation for layout options.
3 +KIML defines a whole set of standard layout options that many layout algorithms support. When an option is supported by an algorithm, that algorithm may override the option's default value. Algorithms may also provide more specialized documentation for layout options.
6 6  
7 7  **Contents**
8 8  
... ... @@ -148,7 +148,7 @@
148 148  
149 149  )))
150 150  |(((
151 -Layout Hierarchy
149 +[[Layout Hierarchy>>doc:||anchor="layoutHierarchy"]]
152 152  )))|(((
153 153  de.cau.cs.kieler.layoutHierarchy
154 154  )))|(((
... ... @@ -383,7 +383,7 @@
383 383  )))
384 384  |(% colspan="1" %)(% colspan="1" %)
385 385  (((
386 -Comment Box
384 +[[Comment Box>>doc:||anchor="commentBox"]]
387 387  )))|(% colspan="1" %)(% colspan="1" %)
388 388  (((
389 389  de.cau.cs.kieler.commentBox
... ... @@ -469,7 +469,7 @@
469 469  )))
470 470  |(% colspan="1" %)(% colspan="1" %)
471 471  (((
472 -Hypernode
470 +[[Hypernode>>doc:||anchor="hypernode"]]
473 473  )))|(% colspan="1" %)(% colspan="1" %)
474 474  (((
475 475  de.cau.cs.kieler.hypernode
... ... @@ -567,7 +567,7 @@
567 567  )))
568 568  |(% colspan="1" %)(% colspan="1" %)
569 569  (((
570 -No Layout
568 +[[No Layout>>doc:||anchor="noLayout"]]
571 571  )))|(% colspan="1" %)(% colspan="1" %)
572 572  (((
573 573  de.cau.cs.kieler.noLayout
... ... @@ -714,6 +714,8 @@
714 714  
715 715  = Detailed Documentation =
716 716  
715 +This section explains every layout option in more detail.
716 +
717 717  == The Most Important Options ==
718 718  
719 719  While most layout options are used to affect how the active layout algorithm computes concrete coordinates for the graph elements, there are some layout options that have a special role in KIML.
... ... @@ -722,19 +722,15 @@
722 722  
723 723  {{id name="layoutAlgorithm"/}}
724 724  
725 -The option with identifier {{code language="none"}}de.cau.cs.kieler.algorithm{{/code}} specifies which layout algorithm to use for the content of a composite node. The value can be either the identifier of a layout algorithm or the identifier of a layout type. In the latter case the algorithm with highest priority of that type is applied.
725 +The option with identifier {{code language="none"}}de.cau.cs.kieler.algorithm{{/code}} specifies which layout algorithm to use for a graph or subgraph. The value can be either the identifier of a layout algorithm or the identifier of a layout type. In the latter case the algorithm with highest priority of that type is applied. It is possible to set different values for this option on subgraphs of a hierarchical graph, where a subgraph is identified by a parent node. A layout algorithm is responsible to process only the direct content of a given parent node. An exception from this rule is made when the [[Layout Hierarchy>>doc:||anchor="layoutHierarchy"]] option is active.
726 726  
727 -The following layout types are predefined:
727 +The following layout has been created by setting a force-based layout algorithm on the inner hierarchy level and a layer-based layout algorithm on the top level.
728 728  
729 -* **Layered** - The layer-based method emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.
730 -* **Orthogonal** - Orthogonal methods follow the "topology-shape-metrics" approach, which first applies a planarization technique, resulting in a planar representation of the graph, then compute an orthogonal shape, and finally determine concrete coordinates for nodes and edge bend points by applying a compaction method.
731 -* **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces.
732 -* **Circular** - Circular layout algorithms emphasize biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent properties of the graph.
733 -* **Tree** - Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.
729 +[[image:attach:layout_algorithm.png]]
734 734  
735 -=== Available Algorithms and Libraries ===
731 +==== Available Algorithms and Libraries ====
736 736  
737 -* **The [[KLay Project>>doc:Layout Algorithms (KLay)]]** - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and edge labels.
733 +* **The [[KLay Project>>doc:Layout Algorithms (KLay)]]** - Java implementations of standard layout approaches, augmented with special processing of graph features such as ports and labels.
738 738  * **Randomizer** - Distributes the nodes randomly; not very useful, but it can show how important a good layout is for understanding a graph.
739 739  * (((
740 740  **Box Layout** - Ignores edges, places all nodes in rows. Can be used to layout collections of unconnected boxes, such as Statechart regions.
... ... @@ -743,6 +743,14 @@
743 743  * **OGDF** ((% style="color: rgb(0,0,0);" %)[[www.ogdf.net>>url:http://www.ogdf.net/||shape="rect"]](%%)) - A self-contained C++ class library for the automatic layout of diagrams. The version that is shipped with KIELER is compiled as an executable that reads files in OGML format and outputs the computed concrete layout.
744 744  * **Graphviz** ([[www.graphviz.org>>url:http://www.graphviz.org/||shape="rect"]]) - An open source graph visualization tool with several graph layout programs, web and interactive graphical interfaces, auxiliary tools, libraries, and language bindings. Graphviz needs to be installed separately in order to be used within KIELER, since it is called in a separate process using the DOT language for communication.
745 745  
742 +==== Predefined Layout Types ====
743 +
744 +* **Layered** - The layer-based method emphasizes the direction of edges by pointing as many edges as possible into the same direction. The nodes are arranged in layers and then reordered such that the number of edge crossings is minimized. Afterwards, concrete coordinates are computed for the nodes and edge bend points.
745 +* **Orthogonal** - Orthogonal methods follow the "topology-shape-metrics" approach, which first applies a planarization technique, resulting in a planar representation of the graph, then compute an orthogonal shape, and finally determine concrete coordinates for nodes and edge bend points by applying a compaction method.
746 +* **Force** - Layout algorithms that follow physical analogies by simulating a system of attractive and repulsive forces.
747 +* **Circular** - Circular layout algorithms emphasize biconnected components of a graph by arranging them in circles. This is useful if a drawing is desired where such components are clearly grouped, or where cycles are shown as prominent properties of the graph.
748 +* **Tree** - Specialized layout methods for trees, i.e. acyclic graphs. The regular structure of graphs that have no undirected cycles can be emphasized using an algorithm of this type.
749 +
746 746  === Diagram Type ===
747 747  
748 748  {{id name="diagramType"/}}
... ... @@ -758,15 +758,6 @@
758 758  * **Use Case Diagram** - Use case diagrams as defined by the UML.
759 759  * **Unconnected Boxes** - Sets of nodes that have no connections and are treated as resizable boxes. This is related to mathematical [[packing problems>>url:http://en.wikipedia.org/wiki/Packing_problem||shape="rect"]]. Example: Regions in [[doc:SCCharts SyncCharts]].
760 760  
761 -== Other Options ==
762 -
763 -* **Layout Hierarchy** ({{code language="none"}}de.cau.cs.kieler.layoutHierarchy{{/code}}) - If this option is supported and active, the layout algorithm is requested to process the full hierarchy contained in the input node. This means that instead of executing another algorithm on each hierarchy level, all levels are arranged in a single algorithm execution.
764 -* **Hypernode** ({{code language="none"}}de.cau.cs.kieler.hypernode{{/code}}) - A node that is marked as hypernode has a special role in the graph structure, since all its incident edges are treated as parts of the same [[hyperedge>>url:http://en.wikipedia.org/wiki/Hypergraph||shape="rect"]]. Example: relation vertices in [[Ptolemy>>url:http://ptolemy.eecs.berkeley.edu/||shape="rect"]] models.
765 -* **Comment Box** ({{code language="none"}}de.cau.cs.kieler.commentBox{{/code}}) - A node that is marked as comment box is treated as a label that needs to be placed somewhere. This is different to normal node labels, which are usually regarded as fixed.
766 -* **No Layout** ({{code language="none"}}de.cau.cs.kieler.noLayout{{/code}}) - Elements that are marked with this option are excluded from layout. This is used to identify diagram objects that should not be regarded as graph elements.
767 -
768 -This section explains every layout option in more detail.
769 -
770 770  === Edge Routing ===
771 771  
772 772  {{id name="edgeRouting"/}}
... ... @@ -776,14 +776,54 @@
776 776  * POLYLINE
777 777  Edges consist of one or more segments defined by a list of bend points.
778 778  * ORTHOGONAL
779 -Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically, but never at an angle.
780 -* SPLINE
781 -Edges are routed as splines (smooth curves). (% style="color: rgb(153,51,0);" %)**TODO:** Add more documentation on how the returned bend points are to be interpreted.
774 +Edges are routed orthogonally, meaning that each segment of an edge runs either horizontally or vertically.
775 +* SPLINES
776 +Edges are routed as splines (smooth curves).
782 782  * UNDEFINED
783 -No particular edge routing style is selected. The result produced by the layout algorithm may be undefined.
778 +No particular edge routing style is selected. Usually this value points to the default setting of the selected layout algorithm.
784 784  
785 -(% style="color: rgb(153,51,0);" %)**TODO:** Add an image illustrating the different routing styles.
780 +[[image:attach:edge_routing.png]]
786 786  
782 +When used as layout option, the edge routing is set for a whole graph or subgraph, i.e. on a parent node. However, the property is additionally used for the output of the layout algorithm in order to mark individual edges. If the edge routing assigned to an edge is anything other than SPLINES, the bend points of that edge are interpreted with their normal meaning, i.e. straight lines are drawn between consecutive bend points. If, on the other hand, a layout algorithm marks an edge with the value SPLINES, the bend points have to be interpreted as control points for a series of cubic splines following this procedure:
783 +
784 +1. Start at the source point of the edge.
785 +1. As long as there are at least three bend points left:
786 +11. Draw a cubic spline segment to the third bend point with the other two bend points as control points.
787 +11. Use the third bend point as start point for the next segment.
788 +11. Consume the three bend points and proceed to the next segment.
789 +1. Check the number of remaining bend points:
790 +11. Two bend points – draw a cubic spline segment to the target point of the edge.
791 +11. One bend point – draw a quadratic spline segment to the target point of the edge.
792 +11. No bend point – draw a straight line to the target point of the edge.
793 +
794 +== Other Options ==
795 +
796 +=== Comment Box ===
797 +
798 +{{id name="commentBox"/}}
799 +
800 +A node that is marked as comment box is treated as a label that needs to be placed somewhere. In contrast to normal node labels (modeled with a KLabel instance), comment boxes may have connections to other nodes, as in the following example.
801 +
802 +[[image:attach:comment_box.png]]
803 +
804 +=== (% style="line-height: 1.5625;" %)Hypernode(%%) ===
805 +
806 +{{id name="hypernode"/}}
807 +
808 +A node that is marked as hypernode has a special role in the graph structure, since all its incident edges are treated as parts of the same [[hyperedge>>url:http://en.wikipedia.org/wiki/Hypergraph||shape="rect"]]. Example: relation vertices in [[Ptolemy>>url:http://ptolemy.eecs.berkeley.edu/||shape="rect"]] models.
809 +
810 +=== Layout Hierarchy ===
811 +
812 +{{id name="layoutHierarchy"/}}
813 +
814 +If this option is supported and active, the layout algorithm is requested to process the full hierarchy contained in the input node. This means that instead of executing another algorithm on each hierarchy level, all levels are arranged in a single algorithm execution.
815 +
816 +=== No Layout ===
817 +
818 +{{id name="noLayout"/}}
819 +
820 +Elements that are marked with this option are excluded from layout. This is used to identify diagram objects that should not be regarded as graph elements.
821 +
787 787  === Port Offset ===
788 788  
789 789  {{id name="portOffset"/}}
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -9470012
1 +9470016
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9470012/KIML Layout Options
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9470016/KIML Layout Options