使用法
$ dot -Tvrml input.dot

VRML

Virtual Reality Modeling Language

VRML形式でグラフを出力します。3D埋め込みを取得するには、ノードにz属性が必要です。これらは、入力グラフの一部として提供するか、dim=3が指定され、少なくとも1つのノードがz値を持っている場合にneatoによって生成できます。

線分は円柱として描画されます。一般に、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)