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

#ex-scalarinterpolator.wrl
# example of ScalarInterpolator
# a Material node  varies its shininess value between 0 and 1
#   varying surface's specular propertiy

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

# Illumination
DEF LIG PointLight{
           location 0 10 0
                   }

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

# 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 Material : 
ROUTE LIGHT.value_changed TO Mat.set_shininess

#