Move

Move  (ve #4 translation_vector);

            Translation_vector is a 4-vector of form: [a,b,c,1]  The last component should be 1.  The effect is to apply the translation:  [x,y,z]  ->  [x+a, y+b, z+c]  either to the scene, or to the camera (See below).

The 3 dimensional scene environment takes a certain amount of getting used to.  It is easy to get lost in a graph3D since the familiar cues that we use to move around in our own Three dimensional  world may be absent.  We may find ourselves staring into space, not knowing where we are, or which way we're heading.  For that reason, navigation becomes an important issue for us.  All navigation is done by reference to the global Coordinate Frame which is represented in the Setup Actor.

            This coordinate system is color-coded in the Setup actor.  The red arrow points in the positive x direction (to the right, initially).  The white arrow extends in the positive y direction (up, initially), and the blue arrow points in the positive z direction (out of the screen, towards the viewer initially).  There are two quite different types of motion that are available for navigation.  We may actively transform the scene (apply a Euclidean transformation to everything), or we may move the camera (apply a Euclidean transformation to our "eyes," the camera).  Both types leave the relative positions and orientations of the actors fixed in the scene.  But they are subtly different in the effect they have on our viewpoint.

Active transformations (moving the scene):

            In what follows immediately below, we shall assume "Move the Scene" has been selected, either from the graph3D Menu, or from the selection bar:

 

            When we described the color-coding of the coordinates above, we said "initially" because if we perform active transformations of the scene, using the global or scene coordinates, then the named arrows will still point in their named directions, but those directions may no longer be to the right, or up, or out.  Let us consider navigation by active transformations of the scene first. 

These will be of two types:  motions from the menu, or motions from commands or scripts.  Active transformations move the entire scene (as a whole with reference to an imaginary fixed background frame) in one of two ways:  They may translate the scene in some direction, or they may rotate the scene about some axis.  Any composition of these rigid motions (the Euclidean affine transformations) will actually be uniquely representable as a rotation about the origin followed by a translation.  This six dimensional group of motions is sometimes called the Euclidean group.  Compositions of these give the only way to move space rigidly.

            We have all of these motions of space available to us if we use programs or commands to navigate.  But if we use the navigation bar (see the picture below) we have six "generators" of that group.  These are the translations in the x,y, and z directions, or rotations (using the right hand rule) about the x,y, and z axes.  These translations and rotations are multiples of a predetermined "step" that you may set using the "timer" button on the menu.  The shorter the delay, the larger the step.  You may also reset the system using the "centering button" below.

The Navigation Bar

                                   

            Using the navigation bar, the 6 arrows on the left describe the 6 ways of translating

the scene: ±x, ±y, and ±z.  By themselves, these are easy to understand.   But once rotations are admitted, using the next six buttons (which are color coded), things become a bit more complicated, because the x, y, and z directions have now become mixed together.  Motion in the positive x direction still means motion in the direction of the "red arrow" but now you have to look to see what direction that is.  And new rotations are similarly affected.   The Move command is used to perform the translations (not the rotations) of the Euclidean Group by script.

            Now how do we perform these active translations by command or by script? 

The Move Command gives relative, not absolute motions.  Each time it is done, a new motion results. Each time with reference to the current frame.

            Move takes a single argument, a 4-vector, the last component of which is 1.  The reason for that is that OpenGL represents all Euclidean motions handily as the 4x4 matrix representation: the Projective transformations.  We'll simply always supply a 1 as the last argument and that will not lead us astray.  If you type:

Move [x,y,z,1];  

the scene will be translated by the vector W whose coordinates are [x,y,z].  Initially, these will coincide with the global background coordinates ("the fixed stars").  Each new Move command is applied last to the sequence of motions that locate the scene.  If no rotations (Turn Commands) are used, this does not matter, since the translations commute with one another.  But if rotations are used, then the order of commands is important.

This is the active transformation. We now move to the more intuitive Camera transformations.

Flying transformations (moving the camera):

            When you select "move the camera,"  navigation becomes a little easier.  The reason for this is probably that (as Poincare observed) we first learn motion by moving ourselves, the changes in our perception of space (which we consider to be geometric) may always be undone by changing the attitude of our bodies, by turning our heads, walking towards an object, or away from it, and so on.

            So the camera represents our field of view.  We should mention that initially, we view a "frustum" that extends from "fixed star coordinates"  z = -1 to z = -1000, with a 45 degree field of view .  The "origin" of the Setup actor is placed at [0,0,-40] and we face towards it.  This becomes the origin of scene coordinates.  All global transformations are done with respect to that origin.  For example, all global (pure) rotations leave that point fixed.  And the solid frustum is projected on the graph3D window.

            The 6 translations on the navigation bar are always in terms of local camera coordinates.  So "up" is always up, forward is always straight ahead, and so on.  This is an important point.  As the camera moves "up" the scene moves "down."  In general, the actions of the camera have the opposite effect (other things being equal) of active transformations of the scene.

            When you select "Move the camera" the Move command flies the camera through the scene.