Applied Graphics and Geometry
by Dr. J. Alan Adams (http://www.usna.edu/Users/mecheng/adams/)
I-1 Rotation of Data to Create Orthographic Views at Specified Eye Position
A. Task: Create an orthographic view from a given point in space defined by vector [E] by aligning the line of sight with the z-axis. Rotate the origin centered data about the local vertical y-axis(CW as seen from +y) by angle q and then about the local x-axis(CCW as seen from +x) by angle f, and finally project the points onto the 2D viewing plane using parallel projection. (Ref: J. Alan Adams and Leon M. Billow, Descriptive Geometry and Geometric Modeling, Holt, Rinehart and Winston, Inc., 1988, Page 56)

1. Consider the triangle defined by vectors P1, P2 and P3 in a RHC(Right Hand Coordinate) system, each defined as a vector of three coordinates(x,y,z) in a 3x1 column matrix.
Matrix [E] gives the x,y,z
coordinates of the eye position.
The negative value for theta will create a CW rotation about the y-axis
in the matrix R1.
Solution:
Angle phi is used for rotation about the x-axis.
Matrix for CCW rotation
about y-axis in RHC system
Matrix for CCW rotation
about x-axis in RHC system
Rotate the object first about the
y-axis by angle theta and then
about the x-axis by angle phi.
T is the 3x3 rotation transformation matrix.
Express the given
data points in a
3x4 column data
matrix. First point is
repeated as a fourth
point to close object.
Transform given points using the
transpose of the data matrix and
the general transformation matrix.
The result is a 4x3 row data matrix.
Change original and transformed data back to vectors(matrix of one column) required for plotting.
2. Notice that the eye position of [1 0 1] shows the triangle as true size in Figure 2, the x-y plane 2-D plot and as a line in Figure 1, the z-y plane(red line). The blue line(no rotation of the object) shows the views as projected onto the z-y plane(as seen from -x), (Figure 1) and the x-y plane(as seen from +z), (Figure 2) respectively. These two, blue orthographic projections happen to be identical for the triangle originally defined. Figures 3 and 4 show the objects and planes in 3-D space. Left click inside the plots below, hold, and move mouse to rotate the figures.
To create Figure 2 precisely, set rotation = 0, tilt = 90 and twist = 90 in Figure 3. The icon path is Format, Graph, 3DPlot, General. See the discussion (page 4) on default coordinates.
3. As an alternate formulation, change the order of the data and transformationl matrix multiplication to calculate Pt. This allows the use of the given data as a column matrix. If the above transformation matrix has been created, then one can simply write:
4. Think of rotating the coordinate axes rather than the object. Thus,
T is the new 3x3 rotation transformation matrix. Note the order of the matrix multiplication.
5. In the first formulation of T, the order of rotation was from left to right after the given row data matrix. The first operation performed is the matrix next to the data, the second operation is the matrix second removed, etc. Now, the order of operation is read from right to left after the given column data matrix P, the combined transformation being R2*R1*P. This produces first a CCW rotation(of the axes) about y by the angle q used in [R1], followed by a CW rotation about x by the angle f used in [R2].
Note that the
tranformation
matrix appears
first on the right
side of this equation.
The four transformed points are now
contained in a 3x4 column matrix.
They agree with the Pc result above.
Change transformed data back to vectors(matrix of one column) required for 2-D plotting. Note the order of the subscripts.
B. Review: Use an eye position of [E] = [1 2 1] in paragraph A-1 and compare the results of the final transformations in Q. Interpret the two orthographic projections onto the z-y and x-y planes. What angles of rotation, tilt and twist will produce the appearance of two lines in Figures 7 and 8? See discussion below (page 4) on default coordinates.

NOTE: The third-angle projection technique common in the USA uses different projection planes than those used above. NOTE: In Europe, the commonly used first-angle projection places the object in the first quadrant between the observer and the projection plane, with projection to the 2-D coordinate planes.
c:\winmcad/vo1/I-1.mcd
Default Coordinates: The MathCAD default coordinate system orientation is shown in Figure 9. The y-axis is to the right and the z-axis is vertical. To create the new orientation of horizontal x, vertical y, and z axis pointing toward the observer as shown in Figure 10, it is necessary to rotate about the initial vertical z axis by 90 degrees CCW to place the x-axis to the right, and then 90 degrees CCW about the new x-axis to make the y-axis vertical. The user should use the mouse and manually arrange Figure 9 to look like Figure 10. Alternately, to be precise, define Rotation = 0, Tilt = 90 and Twist = 90 in Figure 9 (click in Figure 9 and then set these values in Format, Graph, 3DPlot, General) . Similar manual transformations are used in most of the 3D surface plots given in the AGGIE programs.