GRAPH

Description :

The object Graph draws a graph

Parameter :

Graph

Variable Type Default value Description
VertexList List of vertices - Determines the vertices of the graph
EdgeList List of edges - Determines the edges of the graph
Color Color < 0.2, 0.2, 0.2 > Determines the standard color of the graph. This is also the color of all edges and vertices whose color is not given.
Draw Draw Close Draw style.
See Type for more information.
Placer String None Runs a defined placer on the graph before it's being displayed.
Available placers are: simplePlacer, kk, neato, dot, twopi, circo, fdp
Note: The first two placers are integrated. The kk-placer implements a standard algorithm from Kamada & Kawai and should bring good results in the most cases. The other placers are available if the graphViz library is installed and the corresponding executables available via the PATH.

Vertice

Variable Type Default value Description
Color Color Color of graph Determines the color of the vertice.
Position Vector - Determines the position of the vertice
Contain Primitive Sphere Defines the structure that represents the vertex
Label String - Defines a label displayed along with the vertex.

Edge

Variable Type Default value Description
Color Color Color of graph Determines the color of the edge.
V1 String - Determines the first vertice of the (undirected) edge.
V2 String - Determines the second vertice of the (undirected) edge.
Draw Draw Close Draw style. See Type for more information.

GraphPlacer

Variable Type Default value Description
PlaceAll Boolean false Performs a placing for all vertices, even if position is given. By default only those vertices are placed whose position is not given.
ShowCours Boolean false Shows the trajectory of the vertices while placing. Works only with simplePlacer (and sufficient time of placing).
SaveTo String - The graph will be saved to an ImoView file after placing.

Exemple :

Scene graph
{
    Graph
    {
        Color < 0.0, 1.0, 0.0 >
        VertexList
        [
            Vertex k1 { Color <1.0,0.0,0.0> 
                        Position <-1.0,-1.0,0.0>},
            Vertex k2 { Position <1.0,-1.0,0.0>},
            Vertex k3 { Position <1.0,1.0,0.0>},
            Vertex k4 { Position <-1.0,1.0,0.0>}
        ]

        EdgeList
        [
            Edge { Color <0.0,0.0,1.0>                    V1 k1 V2 k2},
            Edge { V1 k2 V2 k3},
            Edge { V1 k3 V2 k4},
            Edge { V1 k4 V2 k1},
            Edge { V1 k2 V2 k4}
        ]
        Placer neato { }
    }
}
 
Show graph