X3D Example Archives: Conformance Nist, Interpolators, Normal Interpolator

 

NormalInterpolator generates a series of normal (perpendicular) 3-tuple SFVec3f values. Each vector value has unit length, i.e. the set of allowed vectors describes the surface of a unit sphere. Authors can ROUTE value_changed output events to a Normal node's vector field, or to another 3-tuple SFVec3f field.

X3D Tooltips of interest: NormalInterpolator.

X3D Specification sections of interest: 19 Interpolation component, 19.2 Concepts and 19.4.5 NormalInterpolator.

X3D Examples Archives of related interest:

 
  5 X3D Models       X3D Model Descriptions
   hierarchy hierarchy Test of a NormalInterpolator node to continue to generate and receive events when outside the Transform hierarchy. A Switch node is the parent of a NormalInterpolator node that changes the illumination of an IndexedFaceSet geometry. The NormalInterpolator has been "switched out" by setting the whichChoice field to -1. The result should be, the NormalInterpolator should continue send and receive events, and animate the illumination of the geometry such that light appears to move horizontally, then vertically around the box shaped IndexedFaceSet.
   keys1000 keys 1000 Test of minimum conformance requirement of 1000 key/keyValue pairs for a NormalInterpolator node. A normal vector is is moved horizontally in the XZ plane, then vertically in the YZ plane using 1000 key/keyValue pairs. The result should be a "moving" light source that moves 180 degrees in the XZ then 180 degrees in the YZ plane, as it illuminates the box shaped IndexedFaceSet geometry.
   samekeys samekeys Test keys with same value. A NormalInterpolator node is used to change the normal vector at each vertex on a rectangular shaped IndexedFaceSet. The fraction_changed field of a TimeSensor node is used to control the keyframe animation of the normals. Because the three midde keys [0.5, 0.5, 0.5, 0.5 0.5] have the same value, the first and last identical key should serve as a limit for that key, and should result in NO vertical change in normals, hence the light will only appear to move horizontally in the XZ plane.
   simple simple Test of basic functionality. A NormalInterpolator node is used to continuously change the normal vector at each vertex on a rectangular shaped IndexedFaceSet. The fraction_changed field of a TimeSensor node is used to control the keyframe animation of the normals. The keys for the NormalInterpolator are set to values 0, 0.11, 0.22, 0.33, 0.44, 0.55, 0.66, 0.77, 0.88, 1.0 ], and the keyValues for the 8 vertices are set to [ 0 0 1, 0 0 1, 0 0 1, 0 0 1, 0 0 -1, 0 0 -1, 0 0 -1, 0 0 -1, -1 0 0, -1 0 0, 1 0 0, 1 0 0, 1 0 0, 1 0 0, -1 0 0, -1 0 0, 0 0 1, 0 0 1, 0 0 1, 0 0 1, 0 0 -1, 1 0 -1, 1 0 -1, 0 0 -1, -1 0 0, -1 0 0, 1 0 0, 1 0 0, 1 0 0, 1 0 0, -1 0 0, -1 0 0, 0 0 1, 0 0 1, 0 0 1, 0 0 1, 0 0 -1, 0 0 -1, 0 0 -1, 0 0 -1, 0 0 1, 0 0 1, 0 0 1, 0 0 1, 0 0 -1, 0 0 -1, 0 0 -1, 0 0 -1, 0 1 0, 0 -1 0, 0 1 0, 0 -1 0, 0 1 0, 0 -1 0, 0 1 0, 0 -1 0, 0 0 1, 0 0 1, 0 0 1, 0 0 1, 0 0 -1, 1 0 -1, 1 0 -1, 0 0 -1, 0 1 0, 0 -1 0, 0 1 0, 0 -1 0, 0 1 0, 0 -1 0, 0 1 0, 0 -1 0, 0 0 1, 0 0 1, 0 0 1, 0 0 1, 0 0 -1, 0 0 -1, 0 0 -1, 0 0 -1 This should result in a continuous change in the normal of each vertex, such that light will appear to move about the geometry in the XZ plane from left to right, then vetically in the YZ plane, up and down.
   value_changed value changed Test of a NormalInterpolators ability to load the correct keyValue into its "value_changed" field prior to receiving any events.Two NormalInterpolator node are associated with two seperate Box geometry. The NormalInterpolator associated with the Box on the left has a keyValue of 0 0 1, while the NormalInterpolator associated with the right Box has the default of no keyValues, or [ ]. As a result, the NormalInterpolator on the left should initialize its "value_changed" field to the value of its first keyValue, or 0 0 1. Because no keyValues are provided to the right NormalInterpolator, it should initialize its "value_changed" field to the MFVec3f default value of []. A Script node reads this value for each NormalInterpolator, and will illuminate the left associated Box by a value equal to its initially read "value_changed" MFVec3f normal value. The right Box will also illuminate, but only if [] is found as its initial value_changed MFVec3f object. When the pointing device passes over the left Box, it should generate a normal at each vertex of 0 0 1 (an fully illuminate the Box) each time it is indicated, then return to its original un-illuminated appearance when the Box is no longer indicated. When the pointing device passes over the right Box, it should NOT illuminate, since no default values are provided as its initial "value_changed" field.

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