<interpolator> ‐ A node or a transformation interpolator
The integer value size of the size attribute defines the number of nodes or transformations that are used by the interpolator. If the string value of the type attribute is node the interpolator is a node interpolator; if the value is transformation the interpolator is a transformation interpolator. In the first case, this element expects size nodes in its scope; in the second case, it expects size transformations in its scope. In the first case, these nodes can be enumerated or described through a concise repeat macro-command (Chapter 4). The string value of the interpolator_type attribute indicates whether it is a classical key-position interpolation (absolute-interpolation) or a random stepwise interpolation (stepwise-interpolation), see Section 1.1.3.
The string value of the id attribute must be the same as the id value of the dominating node.
As described in Section 2.3, there are strong constraints on the types of the nodes and transformations involved in an interpolation. In the case of transformations, all the transformations must have the same type. This constraint must also be satisfied in the case of leaf nodes. In addition, interpolated parametric curves or surfaces defined by control points must have the same number of control points. As for non-terminal node interpolation, all the subtrees dominated by the interpolated nodes must have the same structure, and their corresponding nodes must have the same type.
The following elements must occur in an interpolator: for a node interpolator, as many nodes as the value of the size attribute, and for a transformation interpolator, as many transformations as the value of the size attribute.
The first example below defines an interpolator of three non-terminal or leaf nodes. The second example is an interpolator of three translations. The third example is a random interpolator that generates z-axis rotations from a -90 degrees z-axis initial rotation through elementary variations whose angle is comprised between -2 and 2 degrees.
<node id="interp123"> <interpolator id="interp123" type="node" size="3"> <schedule begin="30" dur="15" repeatCount="100" mode="sinus-periodic" fill="freeze"/> <use xlink:href="SUDAC/oe1.xml:#house#1" /> <use xlink:href="SUDAC/oe2.xml:#house#2" /> <use xlink:href="SUDAC/oe3.xml:#house#3" /> </interpolator> </node> <node id="path#1"> <interpolator id="path#1" type="transformation" size="4"> <schedule begin="0" dur="15" repeatCount="1" mode="linear" fill="freeze" ini="1" end="2"/> <schedule begin="15" dur="25" repeatCount="1" mode="linear" fill="freeze" ini="2" end="3"/> <transformation id="transl1" geometry="translation" x="6" y="3.7" z="2" /> <transformation id="transl2" geometry="translation" x="3" y="3.2" z="2" /> <transformation id="transl3" geometry="translation" x="-1" y="2.5" z="2" /> <node id="tunnel-metro"> ... description of children node(s) ... </node> </interpolator> </node> <node id="eye_spin_{#n}"> <interpolator id="eye_spin_{#n}" type="transformation" size="2" interpolator_type="stepwise-interpolation"> <schedule begin="0" dur="10000000" repeatCount="10000000" mode="linear" fill="remove"/> <transformation id="eye_rotate" geometry="rotation" x="0.0" y="0" z="1" angle="-90"/> <transformation id="eye_rotate" geometry="rotation" x="0.0" y="0.0" z="0" angle="2"/> </interpolator> <node id="eye_yaw_{#n}"> ... </node> </node>