[Home]

Table of contents


Understanding rotation and orientation in AoI

Position and orientation of one coordinate system w.r.t. another

Suppose that we have two coordinate systems, called $A$ and $B.$ We want to describe the relation of $B$ to $A.$ It is possible to do this by specifying just 6 numbers, 3 for the relative position, and the remaining three for the relative orientation. (Details)

Coordinate systems in AoI

AoI is a 3D modelling software. A typical scene in it has many objects. The objects are arranged hierarchically as a tree. We shall call the root of the tree the world. Each object in the scene has its own coordinate system. The coordinate system attached to an object is created automatically while the object is created. You have no choice about it either during creation or during subsequent manipulation of the object. The origin of this coordinate system is more or less at the centre of the object and the axes are more or less along the lines of symmetry.

Hierarchy

The objects in AoI are arranged in a tree. The root of the tree is the world. For each object AoI keeps track of two sets of position and orientation, one w.r.t. the world, and one w.r.t. the parent. The first set is what you see reported via the Object Layout Panel. The second set is never reported anywhere. It is recomputed every time you change the hierarchy. These value are used during animation (the Score window calls them Position and Rotation).

Rotation and translation

These are ways to move an object in 3D space. They move the local coordinate system. There are two ways to do this, via the Orbit tool and via the Object Transform tool. The former is more intuitive and versatile of the two. It has three modes (that you can cycle through by repeatedly pressing W). All the rotations are around the origin of the object's coordinate system. In the default mode you can rotate along axes parallel to the global axes. In the second mode you can rotate around an axis perp to the viewing plane. In the third mode the rotation is along the local coordinate axes.

The Object Transform tool allows you to specify 6 numbers, 3 for translation and 3 for rotation. The rotations are done first, followed by the translation. All rotations are around the local origin, and around axes parallel to the global axes. The rotations are done in the order $z,y,x.$ -------------------- The coordinates of the local origin w.r.t. this global one is called the position of the object. The orientation of the object tells us how the local axes are placed in the global coordimate system.

The orientation uses the $zyx$ Euler angles. Let's take an example. Create a thin cylinder with length 2 and radius 0.01. Set its position to $(1,2,3)$ and it orientation to $(30,40,50).$

What AoI does internally may be considered like this: It creates a cylinder and attaches the local coordinate system to it like this:

Then it places the cyclinder in the global coordinate system such that the local coordinate system exactly matches the global one. Then it applies a $z$-rotation of $50^\circ$ around the local origin. It is followed by a $y$-rotation of $40^\circ$ and finally an $x$-rotation of $30^\circ.$ Next, the cylinder is translated so that the local origin is at $(1,2,3).$

The position and orientation are propertries of the object. They do not propagate to the object's children.

In contrast translation changes the position of the object and also those of its children. Similarly, rotation changes both the position and the orientation of an object as well as those of its children.

There is yet another type of position and orientation. When an object is the child of another, we can talk of the position and orientation of the child relative to its parent. Unfortnately, these values are never displayed numerically in AoI. However, these are the values that used in an animation. In the Score window this relative orientation is wrongly called the rotation. Thus, even if you are trying to animate a pure rotation, you'll need both the position and orientation tracks, and you need to animate the entire hierarchy.

Position and orientation are controlled via the Object Layout Panel. Translation and rotation are controlled either by the Orbit tool (graphically) or by the Object transform box (numerically).

There is no default initial position or orientation for a specific type of object. It depends on where in which view you create that object. Only the Null object is an eception, as it cannot be created via clicking. You have to specify its position and configuration numerically. The defaults being $(0,0,0)$ and $(0,0,0).$

To make an object rotate around any specific point, just create a Null object at that point, and make it the parent of your object. Now rotate the Null object.