#VRML V2.0 utf8 #
##ex-coordinateinterpolator.wrl # example of CoordinateInterpolator # the points are defined by PointSet. An interpolator routed to them # moves the points to the right side # Camera Viewpoint { position 0 5 18 orientation 1 0 0 -0.24 fieldOfView 0.785398 } # Illumination PointLight{ location 0 10 0 } Transform{ children [ Shape { geometry PointSet { color Color { color [ 1 0 0, 1 0 0, 1 0 0, 1 0 0 ] } coord DEF PTS Coordinate { point [0 0 0, 1 1 1, 2 2 2, 3 3 3] } } } ] } # Timer DEF TIMER TimeSensor { loop TRUE cycleInterval 7 } # Interpolation of Coordinates DEF INTERP CoordinateInterpolator { key [ 0, 0.25, 0.5, 0.75, 1.] keyValue [0 0 0 , 1 1 1 , 2 2 2 , 3 3 3, 2.25 0 0 , 3 1 1 , 3.25 2 2 , 4.25 3 3, 4.5 0 0 , 5.25 1 1 , 4.5 2 2 , 5.5 3 3, 6.75 0 0 , 7.75 1 1 , 6. 2 2 , 5.75 3 3, 8. 0 0 , 8.75 1 1 , 7. 2 2 , 6. 3 3 ] } #run interpolator : INTERP ROUTE TIMER.fraction_changed TO INTERP.set_fraction #associate interpolator and geometry : ROUTE INTERP.value_changed TO PTS.set_point #