X3D Example Archives: Conformance Nist, Interpolators, Scalar Interpolator

 

ScalarInterpolator generates piecewise-linear SFFloat values. Authors can ROUTE value_changed output events to other SFFloat fields.

X3D Tooltips of interest: ScalarInterpolator.

X3D Specification sections of interest: 19 Interpolation component, 19.2 Concepts and 19.4.9 ScalarInterpolator.

X3D Examples Archives of related interest:

 
  5 X3D Models       X3D Model Descriptions
   hierarchy hierarchy Test of a ScalarInterpolator node to continue to generate and receive events when outside the Transform hierarchy. A Switch node is the parent of a ScalarInterpolator node that changes the illumination of a Cylinder geometry by a PointLight. The ScalarInterpolator has been "switched out" by setting the whichChoice field to -1. The result should be, the ScalarInterpolator should continue send and receive events, and animate the illumination of the Cylinder geometry.
   keys1000 keys 1000 Test minimum conformance requirement of 1000 keys/keyValues for a ScalarInterpolator. A ScalarInterpolator linearly interpolates between 1000 intensity values ranginge from 0 to 1 along a sine curve. The result is a varying intensity of a PointLight that ranges from dark, to maximum intensity, then back to dark in a 10 second interval.
   samekeys samekeys Test keys with same value. A ScalarInterpolator node is used to change the intensity of a SpotLight that illuminates a Cylinder geometry. The fraction_changed field of a TimeSensor node is used to change the position from keyValues of [ 0.0, 0.5, 1.0, 0.5, 0.0 ] for keys of [ 0.0, 0.5, 0.5, 0.5, 1.0 ] respectively. As a result: because of the three identical keys (0.5), the leftmost and rightmost identical keys serve as limits for that key, and result in a 1/4 intensity of light upon the Cylinder for the time interval between the two limits. The Cylinder should NOT reach full illumination intensity, but should begin with no illumination, increase to 1/4 maximum illumination, then decrease again to no illumination over a 5 second period.
   simple simple Test of basic functionality. A ScalarInterpolator node is used to change the intensity of a SpotLight that illuminates a Cylinder geometry. The fraction_changed field of a TimeSensor node is used to change the position from keyValues of [ 0.0, 0.5, 1.0, 0.5 0.0 ] for keys of [ 0, 0.25, 0.5, 0.75 and 1.0 ] respectively. As a result: the Cylinder geometry will increase from no illumination to maximum illumination, then decrease to no illumination over a 5 second time interval.
   value_changed value changed Test of a ScalarInterpolators ability to set its initial "value_changed" field to the correct value prior to receiving any events. Two ScalarInterpolator node are associated with two seperate Cylinder geometry. The ScalarInterpolator associated with the Cylinder on the left has a keyValue of 1.0, while the ScalarInterpolator associated with the right Cylinder has the default of no keyValues, or [ ]. As a result, the ScalarInterpolator on the left should initialize its "value_changed" field to the value of its first keyValue, or 1.0 . Because no keyValues are provided to the right ScalarInterpolator, it should initialize its "value_changed" field to the SFFloat default value of 0.0 A Script node reads this value for each ScalarInterpolator, and will illuminate the associated Cylinder in intensity by a value equal to its initially read "value_changed" SFFloat value. When the pointing device passes over the left Cylinder, it should illumminate to an intensity value of 1.0 (bright) each time it is indicated, then return to its original intensity (0.5) when no longer indicated by the pointing device. When the pointing device passes over the right Cylinder, it have no light intensity (ie. it should remain black).

The X3D Resources: Examples page and Savage Developers Guide provide more information about the production of this archive.