用法
$ 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}
] }
上次修改时间:2024 年 7 月 28 日:将所有 Hugo 'ref' 替换为 'relref' (bbef86a)