[Previous]   [Next]   [Contents]   [Index]   [Books]   

OneSpace Designer: ME10 Dynamic Drafting MI Interfacing


Transformation Matrices

The Transformation Matrix for 2D MI entities is defined as follows:


This can be divided into submatrix A22 and translation vector b as follows:


The third row {a31 a32 a33} is not used by the ME10 software, but is available for systems which perform non-linear transformations. See the later section on Non-Linear Transformations.

For linear transformations, the third row is {0 0 1} so that the Transformation Matrix becomes:


The matrix can be applied to a vector { x y 1 } to obtain a transformed vector { x' y' u } as follows:


For linear transformations the value of u is always equal to 1.

Using the submatrix and translation vector notation, the above operation becomes:


which corresponds to the following linear equations:

In this way, points corresponding to original 2D geometry (x,y) can be transformed to produce the coordinates (x',y') required for visualization purposes, for example when a part becomes shared and multiple instances are produced.

The submatrix A22 can be used for a variety of operations, such as scaling, rotation, stretching and mirroring.

The transformation vector b changes the position of the geometry in 2D space.

Here are some examples of submatrices:


Identity Matrix

In cases where a transformation matrix is applied to original geometry, but the visualization is to remain unchanged, the matrix will be an identity matrix, with the diagonal elements equal to 1 and all the other elements equal to 0. The 2D matrix will be as follows:


Non-Linear Transformations

If the third row {a31 a32 a33} of the 2D matrix is set to {0 0 1}, the transformations will always be linear. If these values are changed, non-linear transformations can be produced.

A non-linear transformation means that a line will be scaled unequally along its length, but it does not mean that a straight line can be transformed into a curve. The difference between linear and non-linear transformations is illustrated as follows:


As long as the third row is {0 0 1}, a straight line with equally spaced points can be stretched, rotated or otherwise modified, but the result will always be a straight line with equally spaced points. If the third row is changed, the result will be unequal scaling of the geometry.

To perform a non-linear transformation, the third row gives a value of u as follows:

The linear transformation is performed first, so that the (x,y) values are converted to (x',y') using the equations described earlier. These are then divided by u to give the non-linear transformation (x",y") as follows:

The equations for the complete non-linear transformation are as follows:

3D Matrices

For 3D transformations, an additional row is included, so that the transformation matrix is as follows:


In this case, the row {a31 a32 a33 b3} is used to calculate the Z coordinate. The fourth row gives the non-linear transformations which were described in the previous section, and if the transformation is linear, the fourth row will be {0 0 0 1}.

The Global section of an MI file contains a 3D matrix which can be used for mapping 2D geometry into any plane in 3D space. This will be required by some postprocessors which transfer data to 3D systems.


[Previous]   [Next]   [Contents]   [Index]   [Books]