Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Layouting Algorithm
Answer
1/9/19 1:45 PM
Hello!

1I have developed a tool which converts a SWRL-XML document to ADOXML.
2Unfortunately SWRL-XML does not contain position information. Hence, all
3elements are placed on the same position.
4Layouting algorithms may be helpful for me to avoid the problem. Are
5there any documentations, examples for layouting algorithms in
6AdoScript?
7
8Kind Regards

RE: Layouting Algorithm
Answer
5/24/16 1:02 PM as a reply to Benedikt.
In the attached library you can find 6 different layouting algorithms for connected directed graph without cycles (≙ tree). All these algorithms are implemented on the principle of tree traversing. 

A) Radial Layout Algorithms
The traversion of the graph starts at the first level which is the source node. We follow the pointer to the next node table, and iterate through the nodes at that level. This is repeated for all levels until the end of the last node table is reached.
These algorithms are implemented and documented in 'Radial Tree Graph Drawing Algorithm for Representing Large Hierarchies' by Greg Book & Neeta Keshary (Link).

1) Radial Tree Layout - Simple

2) Radial Tree Layout - Complex

3) Radial Tree Layout - Complex incl. Wedges


B ) Tree Layout Algorithms
4) Directed Tree Layout - Horizontal


5) Directed Tree Layout - Vertical

6) Create tree from model information
Here, the algorithm reads the attribute 'Comment' and if there is a name of another object defined, then it creates an 'Edge'.
Attachments: Directed Graph Layout Algorithms Library.abl (108.9k), ExampleModel 1.0.adl (31.8k)