#VRML V1.0 ascii DEF World Separator { . . } DirectionalLight { . . } DEF Car Separator { DEF LeftFrontWheel Separator { . . } DEF RightFrontWheel Separator { . . } DEF LeftRearWheel Separator { . . } DEF RightRearWheel Separator { . . } DEF Body Separator { . . }The headlights consist of three objects, a bottomless cone, a sphere and a light source. The light source, PointLight has yellow color and is very bright. It is located inside the sphere giving off yellow lights. This light then gets filtered by the emissive white semi-transparent sphere. Combining different standard shapes to form a complex object is a trick of the trade in VRML.
DEF RightHeadLight Separator { Transform { translation -3.0 0.3 -0.5 } DEF HeadLight Separator { Separator { Transform { translation -0.2 0 0 rotation 0 0 1 -1.5707963 } Material { emissiveColor 1.0 0.5 0 } Cone { parts SIDES bottomRadius 0.2 height 0.5 } } Separator { Transform { translation -0.45 0 0 } Material { emissiveColor 1.0 1.0 1.0 transparency 0.17 } PointLight { intensity 1 color 1.0 1.0 0.9 } Sphere { radius 0.17 } } } }Similarly, the left headlight is defined. However, the actual definition of the HeadLight is done by aliasing the previously defined object, HeadLight.
DEF LeftHeadLight Separator { Transform { translation -3.0 0.3 0.5 } USE HeadLight # Separator { # Transform { # translation -0.2 0 0 # rotation 0 0 1 -1.5707963 # } # Material { # diffuseColor 1.0 0 0 # } # Cone { # parts SIDES # bottomRadius 0.09 # height 0.5 # } # } # Separator { # Transform { # translation -0.45 0 0 # } # Material { # emissiveColor 1.0 1.0 0 # } # PointLight { # intensity 1 # color 1.0 1.0 0.9 # } # Sphere { # radius 0.1 # } # } } } }