$ dot -Tvrml input.dot
VRML
Virtual Reality Modeling Language
Outputs graphs in the VRML format.
To get a 3D embedding, nodes must have a z
attribute. These can either be supplied as part of the input graph, or
be generated by neato provided dim=3
and at least one node has a z
value.
Line segments are drawn as cylinders.
In general, VRML output relies on having the PNG library to produce images
used to texture-fill the node shapes. However, if
shape=point
,
a node is drawn as a 3D sphere.
Example: simple graph, rendered with
-Tvrml
$ echo 'digraph { a->b }' | dot -Tvrml
#VRML V2.0 utf8
Group { children [
Transform {
scale 0.028 0.028 0.028
children [
Background { skyColor 1.000 1.000 1.000 }
# node a
Transform {
translation 27.000 90.000 0.000
scale 27.000 18.000 1
children [
Transform {
rotation 1 0 0 1.57
children [
Shape {
geometry Cylinder { side FALSE }
appearance Appearance {
material Material {
ambientIntensity 0.33
diffuseColor 1 1 1
}
texture ImageTexture { url "node1.png" }
}
}
]
}
]
}
# node b
Transform {
translation 27.000 18.000 0.000
scale 27.000 18.000 1
children [
Transform {
rotation 1 0 0 1.57
children [
Shape {
geometry Cylinder { side FALSE }
appearance Appearance {
material Material {
ambientIntensity 0.33
diffuseColor 1 1 1
}
texture ImageTexture { url "node2.png" }
}
}
]
}
]
}
# edge a -> b
Group { children [
Transform {
children [
Shape {
geometry Cylinder {
bottom FALSE top FALSE
height 25.584 radius 1.000 }
appearance Appearance {
material Material {
ambientIntensity 0.33
diffuseColor 0.000 0.000 0.000
}
}
}
Transform {
translation 0 17.792 0
children [
Shape {
geometry Cone {bottomRadius 3.500 height 10.000 }
appearance Appearance {
material Material {
ambientIntensity 0.33
diffuseColor 0.000 0.000 0.000
}
}
}
]
}
]
center 0 5.000 0
rotation -0.000 0 1.000 -3.142
translation 27.000 49.000 0.000
}
] }
] }
Viewpoint {position 1.000 2.000 6.438}
] }