#VRML V2.0 utf8 #
#[return] #

# ex-lightdir.wrl
#     Example : directional lights
#     Defining and rendering a sphere using a directional light 

 # Observer in (0,0,6) looking at (0,0,1)
Viewpoint {
	position 0 0 6
	orientation 0 0 1 0 
}
#a DirectionalLight means a light source that sends rays parallel to
# a given direction 
#ambientIntensity, varies 0 - 1 defining an additional ambient contribution
#color r g b  , each component in the range 0-1 defining the light color
#direction x y z, defines the light direction (e.g. 1 0 0, means x-direction) 
#intensity 1, range 0-1
#on FALSE, lit (TRUE) or unlit light

#example : no-ambient, color=white, -z direction, intensity .5 , lit 
DirectionalLight{
        ambientIntensity 0
        color 1 1 1        # white
        direction  0 0 -1
        intensity .2
        on TRUE
}

# the sphere is defined green (specular) and located at (0,0,0)
# defines a Shape Node  and a surface material
  Shape{
   appearance Appearance {
		material Material {
                            ambientIntensity 0.2 # default
                            diffuseColor .4 .4 .4 #in order to see the sphere
                            shininess .5 # sharp
		            specularColor .0 .5 0
				  }
		}
		geometry Sphere {}
        }
#