Graphics Programs Reference
In-Depth Information
A similarity is obtained for a 2 + b 2 = c 2 + d 2 and ac + bd = 0. A similarity is a
transformation that preserves the ratios of lengths. A typical similarity is scaling, but
it may be combined with rotation, reflection, and translation.
An equiareal transformation (preserving areas) is obtained when
=1.
Ashearinginthe x direction is caused by a = d =1and b = 0. Similarly, a
shearing in the y direction corresponds to a = d =1and c =0.
A uniform scaling is a = d> 0and b = c = 0. (The identity is a special case of
scaling.)
|
ad
bc
|
A uniform reflection is a = d< 0and b = c =0.
A rotation is the result of a = d =cos θ and b =
c =sin θ .
1.3 Three-Dimensional Coordinate Systems
We now turn to transformations in three dimensions. In most cases, the mathematics of
linear transformations is easy to extend from two dimensions to three, but the discus-
sion here demonstrates that certain transformations, most notably rotations, are more
complex in three dimensions because there are more directions about which to rotate
and because the simple terms clockwise and counterclockwise no longer apply. We start
with a short discussion of coordinate systems in three dimensions.
In two dimensions, there is only one Cartesian coordinate system, with two per-
pendicular axes labeled x and y (actually, the axes don't have to be perpendicular, but
this is irrelevant for our discussion of transformations). A coordinate system in three
dimensions consists similarly of three perpendicular axes labeled x , y ,and z , but there
are two such systems, a left-handed and a right-handed (Figure 1.18a), and they are
different. A right-handed coordinate system is constructed by the following rule. Align
your right thumb with the positive x axis and your right index finger with the positive y
axis. Your right middle finger will then point in the direction of positive z . The rule for
a left-handed system uses the left hand in a similar manner. It is also possible to define
a left-handed coordinate system as the mirror image (reflection) of a right-handed one.
Notice that one coordinate system cannot be transformed into the other by translating
or rotating it.
The difference between left-handed and right-handed coordinate systems becomes
important when a three-dimensional object is projected on a two-dimensional screen
(Chapter 3). We assume that the screen is positioned at the xy plane with its origin
(i.e., its bottom left corner) at the origin of the three-dimensional system. We also
assume that the object to be projected is located on the positive side of the z axis
and the viewer is located on the negative side, looking at the projection of the image
on the screen. Figure 1.18b shows that in a left-handed three-dimensional coordinate
system, the directions of the positive x and y axes on the screen coincide with those of
the three-dimensional x and y axes. In a right-handed system (Figure 1.18c), though,
the two-dimensional x axis (on the screen) and the three-dimensional x axis point in
opposite directions.
Search WWH ::




Custom Search