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

#ex-scalarinterpolator.wrl
# example of ScalarInterpolator
# a light source varies its intensity value between 0 and 1 (there is
#   also the default light defined by the Material node

# Viewer
Viewpoint {
   position    0 5 18
   orientation 1 0 0 -0.24
   fieldOfView 0.785398
}

# Illumination
DEF LIG PointLight{
           location 0 10 0
           intensity 0
                   }

Shape {
  geometry Sphere { radius 3}
         appearance Appearance {
         material Material {ambientIntensity 0
                            diffuseColor 0 0 1
                            specularColor 1 0 0
                            }
                                }
       }
# Timer
DEF TIMER TimeSensor {
	loop TRUE
	cycleInterval 7
	     	      }

# Interpolation of Coordinates
DEF LIGHT ScalarInterpolator {
     key[ 0, 0.12, 0.25, 0.37, 0.5, 0.62, 0.75, 0.88, 1.]
     keyValue [ 0, 0.12, 0.25, 0.37, 0.5, 0.62, 0.75, 0.88, 1.]
                              }
#run interpolator : INTERP 
ROUTE TIMER.fraction_changed TO LIGHT.set_fraction

#associate interpolator and geometry : 
ROUTE LIGHT.value_changed TO LIG.set_intensity

#