5.16. Ellipse Transformation (transformation)

<transformation geometry="ellipse-transformation"> ‐ An ellipse transformation

5.16.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.16.2. Description

This transformation is an elliptical transformation along a ellipse. It expects two entities in its scope: a ellipse and a schedule. The ellipse defines the curve along which the objects are moved. The schedule defines the time function that controls the motion of the objects along the ellipse. If the boolean attribute with_roll is on, the transformation along the ellipse is complemented with a rotation that leans the objects towards the center of the ellipse. 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 ellipse that defines the transformation path can be modified through a set_node_attribute_value command with a ellipse element as child node.

5.16.3. Expected children

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

5.16.4. Example

The example below shows an ellipse transformation centered at the origin with 40 for x-length and 80 for z-length. The motion along the curve is controlled by a linear time function that begins at time 0, and repeats 1000 times with a duration of 0.1. This transformation results in a continuous motion of the Viewpoint mobile_camera-ell along the ellipse.

<node id="camera_ellipse">
  <transformation id="transformation_camera_ellipse" 
               geometry="ellipse-transformation" with_roll="false">
    <schedule begin="0" dur="0.1" repeatCount="1000" 
               mode="linear" fill="freeze"/>
    <ellipse id="rail" a="20" b="40" x="0" y="0" z="0" width="0.5"/>
  </transformation>
  <node id="rotation_camera-ell">
    <transformation id="rotation_camera-ell" geometry="rotation"
                    x="0" y="1" z="0" angle="90"/>
    <node id="mobile_camera-ell">
      <viewpoint id="mobile_camera-ell" /> 
    </node>
  </node>
</node>