5.60. Spiral Transformation (transformation)

<transformation geometry="spiral-transformation"> ‐ A spiral transformation

5.60.1. Attributes

NameTypeDefaults
idIDNone (required)
with_rollBOOLEANtrue
xFLOATNone (read-only)
yFLOATNone (read-only)
zFLOATNone (read-only)
yawFLOATNone (read-only)
pitchFLOATNone (read-only)
rollFLOATNone (read-only)

5.60.2. Description

This transformation expects two entities in its scope: a spiral and a schedule. The spiral defines the curve along which the objects are moved. The schedule defines the time function that controls the motion of the objects along the spiral. If the boolean attribute with_roll is on, the transformation along the spiral is complemented with a rotation that leans the objects towards the center of the spiral. The angle of the lean is proportional to the angular speed.

The values of the read-only attributes x, y, z represent the dynamic translation component of the curve transformation. The values of the read-only attributes yaw, pitch, roll represent the dynamic rotation component of the curve transformation. The rotation axes are aligned with the object coordinates and described in Figure 5-4.

The attribute values of the spiral that defines the transformation path can be modified through a set_node_attribute_value command with a spiral element as child node.

5.60.3. Expected children

The following elements must occur in spiral transformation: schedule, spiral.

5.60.4. Example

The example below shows a transformation spiral centered at the origin, with a vertical axis (y coordinates). The motion along the curve is controlled by a linear time function that begins at time (0+({#n} * 0.1)), and repeats 1 time with a duration of 10. This transformation results in a continuous motion of the interpolated node along the spiral.

<node id="object_spiral">
  <transformation id="transformation_metro{#n}" 
       geometry="spiral-transformation" with_roll="false">
    <schedule begin="(0+({#n} * 0.1))" dur="10" repeatCount="1" 
         mode="linear" fill="hide"/>
    <spiral id="spiral1" type="exponential-spiral" radius="9" 
         radiusGrowth="-1.04" angle="0" axisGrowth="1.07" 
         rotationNumber="6.0" x="0" y="0" z="0" width="0.1" segments="100"/>
  </transformation>
  <node id="interpolator_ray">
    <interpolator id="interpolator_ray" type="node" size="2">
      <schedule begin="(0+(10/{#n}))" dur="10" repeatCount="1" 
           mode="sinus-periodic" fill="freeze" ini="1" end="2"/>
      <use xlink:href="bib/Spiral/ray1.xml:#node body #1" />
      <use xlink:href="bib/Spiral/ray2.xml:#node body #2" />
    </interpolator>
  </node>
</node>