media @ VU
[] readme course preface I 1 2 II 3 4 III 5 6 7 IV 8 9 10 V 11 12 afterthoughts appendix references examples resources _

talk show tell print

web3d-interpolator.vr

web3d-interpolator.vr (wrl ) [ flux / bitmanagement / cortona / octaga ]

Web3D/VR

interpolator

interpolator

This example is to illustrate the use of a ##timesensor and interpolator. In another example, ##the interpolator will be replaced by a script.

shape


  Shape  {    ## # The shape
          geometry Sphere { radius 2 }
          ## # we will modify the Material (DEF)
          appearance Appearance {
                  material DEF MATERIAL Material {
                          diffuseColor 1 0 0
                          }
                  } ## <embed src=@vr-interpolator.wrl width=30 height=30></p>
    } 
  
  

The next section gives the code for the interpolor ##and the routing. Remember

timesensor


  
    DEF TIME TimeSensor { loop TRUE cycleInterval 5 } #<l++>
  
    DEF COLORS ColorInterpolator {
          key [ 0 0.5 1 ]
          keyValue [ 1 0 0,  0 0 1, 1 0 0 ]
          } #<l++>
  
  ROUTE TIME.fraction_changed TO COLORS.set_fraction
  ROUTE COLORS.value_changed TO MATERIAL.diffuseColor
  
  


(C) A. Eliëns 21/5/2007

You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.