Erzeugen von Primitiven
|
Figur | Code | VRML / Koordinatensystem |
---|---|---|
Kegel |
#VRML V2.0 utf8 #Beispiel eines Kegels DEF FIGUR1 Transform { translation 0 0 0 rotation 1 0 0 0.0 children [ Shape { geometry Cone { height 2.0 bottomRadius 1.0 } appearance Appearance { material Material { diffuseColor 0.4 0.8 0.8 shininess 0.3 specularColor 0.4 0.8 0.6 transparency 0.0 } } } ] } |
|
Quader |
#VRML V2.0 utf8 #Beispiel eines Quaders DirectionalLight { direction 0 -1 0 color 1 1 1 } DEF FIGUR2 Transform { translation 0 0 0 rotation 1 0 0 0.0 children [ Shape { geometry Box { size 1.0 2.0 0.25 } appearance Appearance { material Material { diffuseColor 0.8 0.2 0.2 shininess 0.0 specularColor 0.2 0.2 0.8 transparency 0.0 } } } ] } |
|
Kugel |
#VRML V2.0 utf8 #Beispiel einer Kugel NavigationInfo { headlight TRUE type "FLY" } DEF FIGUR3 Transform { translation 0 0 0 rotation 1 0 0 0.0 children [ Shape { geometry Sphere { radius 1.0 } appearance Appearance { material Material { diffuseColor 0.2 0.8 0.2 } } } ] } |
|
Zyllinder |
#VRML V2.0 utf8 #Beispiel eines Zyllinders DEF FIGUR4 Transform { translation 0 0 0 rotation 1 0 0 0.7854 children [ Shape { geometry Cylinder { height 2.0 radius 0.5 } appearance Appearance { material Material { diffuseColor 0.0 0.8 0.8 } } } ] } |
|
Tabelle 0-1: Primitive in VRML