CH05 Two Dimensional Geometric Transformations
CH05 Two Dimensional Geometric Transformations
t x
x' x T=
P' = P= t y
y ' y
Translation
• This allows us to write the two-dimensional
translation equations in the matrix form:
P' = P + T
– We could translate an object by applying the
equation to every point of an object.
• Because each line in an object is made up of an infinite
set of points, however, this process would take an
infinitely long time.
• Fortunately we can translate all the points on a line by
translating only the line’s endpoints and drawing a new
line between the endpoints.
• This figure translates the “house” by (3, -4)
Translation
• Translating a point from position P
to‘ position P' with translation
vector T.
2
=
1 6
0
1 2 3 4 5 6 7 8 9 10
x
3 6 9
3 3
2
1 2 3
1 1
0
1 2 3 4 5 6 7 8 9 10
x
Note: House shifts position relative to origin
Combined Transformations
• Most applications require the use of more
than one basic transformation to achieve
desired results. As stated earlier, scaling with
an arbitrarily fixed point involves both scaling
and translation. And rotation around a given
point, other than the origin, involves rotation
and translation. We will now consider these
combined transformations.
Scaling With an Arbitrary Point
• Scaling With an Arbitrary Point In uniform
scaling, all points and their coordinates are scaled
by a factor s. Therefore, unless the fixed point is
located at (0, 0), it will be moved to a new
location with coordinates s-times x and s-times y.
To scale an object about a fixed point, the fixed
point is first moved to the origin and then the
object is scaled. Finally, the object is translated or
moved so that the fixed point is restored to its
original position. The transformation sequence is,
• [P*] = [P] [Tt] [Ts] [T-t]
• Where, [Tt] is the translation transformation
matrix, for translation of the fixed point to the
origin,
• [ T s] is the scaling transformation matrix,
and
• [T-t] is the reverse translation matrix, to
restore the fixed point to its original
position.
• The three transformation matrices [Tt] [Ts] [T-
t] can be concatenated to produce a single
transformation matrix, which uniformly scales
an object while keeping the pivot point fixed.
Thus, the resultant, concatenated
transformation matrix for scaling is,
• The concatenated equation can be used
directly instead of the step-by-step matrix
solution. This form is preferable when writing
a CAD program
Example
• Given the triangle, described by the
homogeneous points matrix below, scale it by
a factor 3/4, keeping the centroid in the same
location. Use
• (a) separate matrix operation and
• (b) condensed matrix for transformation.
Example
• The centroid of the triangle is at
x=(2+2+5)/3=3 y=(2+5+5)/3= 4 C(3,4)