<<VRML 2.0 - An Introductory view by examples

PositionInterpolator

[interpolator's example]                                       [run]

PositionInterpolators interpolate linearly among a set of SFVEC3f values (keyValue parameter). The vectors are interpreted as absolute positions in object space.

{
eventIn SFFloat set_fraction # this input float value causes the interpolator function to evaluate
exposedField MFFloat key [ ] # key values in the set_fraction domain
exposedField MFVec3f keyValue [ ] # functions values (1:1 related to above field)
eventOut SFVec3f value_changed # current output value (associated to the current time)
}

Usage :


    PositionInterpolator {
          key [0, 0.0833, 0.167, 0.25, 0.333, 0.417, 0.5, 
               0.583, 0.667, 0.75, 0.833, 0.917, 1]
          keyValue [-8 0  0, -7   -4 0, -4  -6 0, 
                     0 -7 0, 2.75 -5 0,  4  -3 0, 
                     5 0  0, 4.00  3 0, 2.75 5 0,
                     0 7  0, -4    6 0, -7   4 0, -8 0 0]
                          }