31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

17.9 Windows for 3d visualization ( d3 window )<br />

1. Definition<br />

<strong>The</strong> data type d3 window supports three-dimensional visualization. It uses a <strong>LEDA</strong><br />

window to visualize and animate three-dimensional drawings of graph. For this purpose<br />

we need to assign positions in 3d space to all nodes of the graph (see init-operations<br />

and set position-operation). <strong>The</strong> edges of the visualized graph are drawn as straight-linesegments<br />

between the 3d positions of their source and target nodes. Note all edges of the<br />

graph must have a reversal edge.<br />

If the graph to be shown is a planar map the faces can be shaded in different grey scales<br />

(if the solid flag is true).<br />

<strong>The</strong> graph can be drawn with the draw-operation and animated with the move-operation.<br />

<strong>The</strong> draw-operation draws a frontal projection of the graph on the output window. <strong>The</strong><br />

move-operation starts a simple animation mode. First it draws the graph, then it rotates<br />

it (the rotation depends on the x rotation and y rotation flags and the mouse position)<br />

and finally returns the pressed mouse button.<br />

Every object of type d3 window maintains a set of parameters:<br />

• x rotation (type bool); if true, rotation about the x-axis is enabled during a move<br />

operation<br />

• y rotation (type bool); if true, rotation about the y-axis is enabled during a move<br />

operation<br />

• elim (type bool); if true, hidden lines will be eliminated<br />

• solid (type bool); if true, faces have to be drawn in different grey scales<br />

• draw edges (type bool) enables/disables the redraw of edges<br />

• message (type string) is the message that will be displayed on top of the drawing<br />

area of the output window<br />

In addition, a d3 window stores information assigned to the nodes and edges of the visualized<br />

graph.<br />

• color (type color) information for nodes and edges<br />

• position (three-dimensional vectors) information for the nodes<br />

• arrow (type bool) information for the edges (define whether or not edges have to be<br />

drawn as arrows)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!