next up previous
Next: Directed Edge Constraints Up: Interactive Constraint Generation Previous: Interactive Constraint Generation

Containment Constraints

Figure: A diagram showing how separation constraints are generated for cluster constraints. The green box is the shape representing the vertex in the diagram.
l200pt
Containment constraints are constraints that force nodes to remain with a certain area. A subset of containment constraints implemented in Dunnart are page boundary constraints, which as the name suggests uses the definition of the drawing canvas as the containment area. Dunnart defines the origin of the page at the top left corner. In Dunnart a diagram is drawn by positioning shapes onto the canvas and connecting those shapes together. Because the page boundaries are values that are only going to change if the page is rotated (in Dunnart the canvas can only have portrait and landscape orientation at fixed sizes), an option is presented to the user in the form of a checkbox to allow the user to switch on page boundary constraints or not.

When the layout functionality is selected Dunnart takes all the shapes on the canvas and converts them to vertices, and uses all the connectors on the canvas to create edges between the vertices. This graph structure is passed to the IPSep-CoLa layout algorithm. If page boundary constraints are wanted by the user, for each vertex Dunnart generates separation constraints so the the vertex's placement in the horizontal dimension is less than the right side of the page, and greater than the left side of the page. The same type of separation constraints are generated in the vertical dimension so that the vertex's position is less than the bottom, and greater than the top of the page. This is illustrated in Fig. [*]

Once all the constraints are generated for the graph, the graph and the constraint set are passed to the IPSep-CoLa algorithm. As the algorithm iteratively moves the vertices, it tells Dunnart which vertices were moved and to where, and Dunnart maps those vertices back to the shapes on the canvas and moves the shapes to their new positions. Doing this allows the user to see each individual iteration of the layout, thus seeming to animate the procedure, which helps preserve the user's mental map of the diagram.
next up previous
Next: Directed Edge Constraints Up: Interactive Constraint Generation Previous: Interactive Constraint Generation
2006-11-07