Transformations for Animation

1. Flying Sequences

In generating animated flying sequences, we require the viewpoint to move around the scene. Let the required viewpoing be , and let the required view direction be .

We can transform coordinates into a coordinate system centered at the viewpoint, looking in the positive -direction. To do this we must:

  1. Translate about the origin, .
  2. Rotate about the -axis until is in the -plane. To do this, define and , . Then the rotation matrix is:
  3. Rotate about the -axis until points along the -axis. To do this, define and , . Then the rotation matrix is:

These can then be combined into a single tranformation . For every point scene, we calculate . The view is now in canonical form and we can apply projection.

About a general line, we can first rotate the general line to align it with the -axis, then rotate, and then rotate back: .

We can do similar effects (such as shrinking an object in-place) as .

2. Projection Matrices

For canonical orthographic projection we drop the -coordinate: such that .

For canonical perspective projection we do: such that . We can normalize this to get .

All projection matrices are singular, or non-invertible. Given a 2D image, we cannot in general reconstruct the 3D scene.

3. Transformation Matrices

Homogeneous coordinates fall into two types:

  1. Position Vectors with a non-zero final ordinate . This can be normalized to Cartesian form.
  2. Direction Vectors have a zero final ordinate . These have direction & magnitude.
  • If we add two direction vectors, we get another direction vector.
  • If we add a position vector and a direction vector, we get another position vector.
  • If we add two position vectors, we obtain their midpoint. This is reasonable, as adding two position vectors has no real meaning in vector geometry.

In a transformation matrix, the bottom row is always . Hence, the columns comprise of three direction vectors and one position vector.

The columns of the transformation matrix represent the columns of a new coordinate system in terms of the old coordinate system:

4. Dot Product as Projection

The dot product is defined as , where is the angle between and . If is along a cooridnate axis then is the ordinate of in the direction of . Hence, we can see the dot product can be used to express a projection, where is a unit direction vector.

Hence, we can conclude that to transform into coordinates, we can use tehe matrix:

Now, we can control the vertical, for example by constraining to point upwards.

To solve the flying sequence problem, we can define:

To find the 4 unknowns, , , and , we can use the orthogonality conditions , so . Since , we have:

Back to Home