A scene definition would look something like:

    <scene id="st1">
      <perspective>
        <over>-20</over>
        <up>-11</up>
        <rad>1600</rad>
        <pp>1800</pp>
        <newx>0</newx>
        <newy>0</newy>
        <scale>1</scale>
        <spline>constant</spline>
      </perspective>

      <objfg transform="translate(-145,-64,80) roty(45)">
        <obj class="wdm3" href="wdm01" transform="rotz(60)" />
        <obj class="wdm4"  href="wdm02" transform="rotz(60)" />
      </objfg>
    </scene>

The scene itself will consist of a set of foreground objects, objfg, made up of a sequence of obj elements. Each scene has an optional id attribute which is mainly of use to keep a record of the individual scenes. It is not used by def_perspective_scenes.

The perspective element defines the perspective transformation to apply to the scene.

Y X Z over up rad pp

Figure 6.1: Perspective Transformation

The perspective transformation is with respect to the origin of the coordinate system. The projection point is at a distance rad from the origin in a direction defined by over and up. The projection plane is defined perpendicular to the line from the origin to the projection point and a distance pp from the projection point.

The elements newx and newy allow the resulting scene to be displaced from the projected position and scale allows the scene to be scaled. This transformation is applied last.

The final parameter, spline defines the relationship between this keyframe and the next. This will be described with the transformation animate_scenes.