Читать книгу Computer Aided Design and Manufacturing - Zhuming Bi - Страница 42

2.2.4 Coordinate Transformation of Objects

Оглавление

A point only includes positional data while an object includes both positional and orientational data in space. In addition, it may be convenient to represent the position and orientation by a local coordinate system (LCS) attached to an object. Figure 2.9 shows such a CS, which is called an object coordinate system (ObXbYbZb).


Figure 2.9 Object coordinate system in a world coordinate system.

In Figure 2.9, a reference origin is used to represent the position of the object with respect to the world coordinate system (OwXwYwZw) and the orientation of the object is represented by three unit vectors (Xb, Yb, Zb). Furthermore, a homogeneous coordinate (x, y, z, h) and the corresponding 4 by 4 homogenous matrix [T]4x4 in Eq. (2.4) are widely used to facilitate the matrix manipulations for the coordinate transformation of objects:

(2.4)

where [T]4 × 4 is the homogenous matrix for the representation of an object CS {ObXbYbZb} in the world coordinate system (OwXwYwZw).

Note that the homogenous matrix in Eq. (2.4) includes six independent variables: three for the position and the rest for the orientation.

A homogenous transformation matrix can be generalized to deal with any transformation of objects in a coordinate system. Figure 2.10 shows the generalized matrix of homogeneous transformation. The elements of the matrix in different fields affect the transformation of an object in different ways. For examples, the elements (a, e, j) scale the coordinates of x, y, and z, the elements (p, q, r) translate the coordinates of x, y, and z, and the element s gives an overall inverse scale of the object.


Figure 2.10 Impacts of elements in a generalized homogeneous matrix.

The generic homogeneous matrix [T]G can be customized to implement some common coordinate transformations of an object. For example, the translation matrix [T]TR of an object can be simplified as

(2.5)

where [T]TR is the 3D translation matrix and p, q, r are the translational distances of a point from its original position along the x, y, and z axes, respectively.

The scaling matrix [T]SC of a 3D object can be defined as

(2.6)

where [T]SC is the 3D scaling matrix and a, e, j are the scaling factors along the x, y, and z axes, respectively.

Computer Aided Design and Manufacturing

Подняться наверх