StageTools - Documentation (StageManager/Samples/Parent) [Prev][Up][Next]

Frames of Reference:

Transformations on an object can be performed in one of two different frames of reference: the coordinate system of the object itself, or the coordinate system of the object containing the transformed object.

This example shows the difference between these two methods. First a compound object is created called cube that is made up of a cube together with some axes. These axes mark the coordinate system of the cube. A second set of axes are loaded; these mark the coordinate system of the parent, which is the world object in Geomview.

An initial configuration is set up using Transform that has the cube offset from the center of the world.

Note the difference between rotating the cube in its own coordinate system and rotating it in the world coordinate system in the first two Sequence commands. The next two sequences show that you frequently can get the same effects by changing the centers of the transformations, done here by adding a second parameter to the XY command.

The cube and xyz.vect files are standard ones that come with Geomview.


parent.sm

   Geometry build cube {{< cube} {< xyz.vect}}
   Load xyz.vect

   Transform {Scale .75}
   Transform {Product {YZ -$pi/3} {XY -$pi/6}}

   Transform {Translate {0 1 0}} cube

   Pause 3
   Sequence {XY $pi/2} 8 cube
   Pause 3
   Sequence {XY $pi/2} 8 cube -parent
   Pause 3
   Sequence {XY $pi/2 {-1 0 0}} 8 cube
   Pause 3
   Sequence {XY $pi/2 {0 -1 0}} 8 cube -parent
   Pause 5


[HOME] StageTools Documentation web pages
Created: 03 Jun 1996
Last modified: Aug 17, 2006 9:55:06 AM
Comments to: dpvc@union.edu
[Next] Rotating a Torus
[Up] Sample StageManager Files
[Prev] Rotating Cube