$ dot -Tvrml input.dot
VRML
虛擬實境建模語言
以 VRML 格式輸出圖形。要獲得 3D 嵌入,節點必須具有 z
屬性。這些可以作為輸入圖形的一部分提供,或者由 neato 生成,前提是 dim=3
且至少有一個節點具有 z
值。
線段繪製為圓柱體。一般而言,VRML 輸出依賴於 PNG 函式庫來產生用於紋理填充節點形狀的圖像。但是,如果 shape=point
,則節點會繪製為 3D 球體。
範例:簡單圖形,使用
-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}
] }