
The Virtual Reality Modeling Language (VRML) is a language
for describing multi-participant interactive simulations -- virtual worlds
networked via the global Internet and hyperlinked with the World Wide Web.
All aspects of virtual world display, interaction and internetworking can be
specified using VRML. It is the intention of its designers that VRML become
the standard language for interactive simulation within the World Wide Web.
#VRML V1.0 ascii
Separator {
DirectionalLight {
direction 0 0 -1 # Light shining from viewer into scene
}
PerspectiveCamera {
position -8.6 2.1 5.6
orientation -0.1352 -0.9831 -0.1233 1.1417
focalDistance 10.84
}
Separator { # The red sphere
Material {
diffuseColor 1 0 0 # Red
}
Translation { translation 3 0 1 }
Sphere { radius 2.3 }
}
Separator { # The blue cube
Material {
diffuseColor 0 0 1 # Blue
}
Transform {
translation -2.4 .2 1
rotation 0 1 1 .9
}
Cube {}
}
}
#VRML V1.0 ascii
Separator {
Separator { # Simple track-light geometry:
Translation { translation 0 4 0 }
Separator {
Material { emissiveColor 0.1 0.3 0.3 }
Cube {
width 0.1
height 0.1
depth 4
}
}
Rotation { rotation 0 1 0 1.57079 }
Separator {
Material { emissiveColor 0.3 0.1 0.3 }
Cylinder {
radius 0.1
height .2
}
}
Rotation { rotation -1 0 0 1.57079 }
Separator {
Material { emissiveColor 0.3 0.3 0.1 }
Rotation { rotation 1 0 0 1.57079 }
Translation { translation 0 -.2 0 }
Cone {
height .4
bottomRadius .2
}
Translation { translation 0 .4 0 }
Cylinder {
radius 0.02
height .4
}
}
}
SpotLight { # Light from above
location 0 4 0
direction 0 -1 0
intensity 0.9
cutOffAngle 0.7
}
Separator { # Wall geometry; just three flat polygons
Coordinate3 {
point [
-2 0 -2, -2 0 2, 2 0 2, 2 0 -2,
-2 4 -2, -2 4 2, 2 4 2, 2 4 -2]
}
IndexedFaceSet {
coordIndex [ 0, 1, 2, 3, -1,
0, 4, 5, 1, -1,
0, 3, 7, 4, -1
]
}
}
WWWAnchor { # A hyperlinked cow:
name "http://www.foo.edu/CowProject/AboutCows.html"
Separator {
Translation { translation 0 1 0 }
WWWInline { # Reference another object
name "http://www.foo.edu/3DObjects/cow.wrl"
}
}
}
}
x-world/x-vrml
The MIME major type for 3D world descriptions is x-world. The MIME minor type for VRML documents is x-vrml. Other 3D world descriptions, such as oogl for The Geometry Center's Object-Oriented Geometry Language, or iv, for SGI's Open Inventor ASCII format, can be supported by using different MIME minor types.