











































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Transformation 2 Changing Position, shape, size, or orientation of an object on display is known as transformation. Basic transformation includes three transformations Translation, Rotation, and Scaling. These three transformations are known as basic transformation because with combination of these three transformations we can obtain any transformation.
Typology: Assignments
1 / 51
This page cannot be seen from the preview
Don't miss anything!












































Changing Position, shape, size, or orientation of an object on display is known as transformation.
Basic transformation includes three transformations Translation , Rotation , and Scaling. These three transformations are known as basic transformation because with combination of these three transformations we can obtain any transformation.
(𝒙′, 𝒚′)
𝒕𝒚 (𝒙, 𝒚)
Fig. 3.1: - Translation.
Example : - Translate the triangle [A (10, 10), B (15, 15), C (20, 10)] 2 unit in x direction and 1 unit in y direction. We know that
Final coordinates after translation are [A’^ (12, 11), B’^ (17, 16), C’^ (22, 11)].
It is a transformation that used to reposition the object along the circular path in the XY - plane. To generate a rotation we specify a rotation angle 𝜽 and the position of the Rotation Point ( Pivot Point ) (𝒙𝒓,𝒚𝒓) about which the object is to be rotated. Positive value of rotation angle defines counter clockwise rotation and negative value of rotation angle defines clockwise rotation. We first find the equation of rotation when pivot point is at coordinate origin(𝟎, 𝟎).
(𝒙′, 𝒚′)
(𝒙, 𝒚)
𝜽
∅
Fig. 3.2: - Rotation.
Fig. 3.3: - Rotation about pivot point.
Transformation equation for rotation of a point about pivot point (𝒙𝒓,𝒚𝒓) is: 𝒙′^ = 𝒙𝒓 + (𝒙 − 𝒙𝒓) 𝐜𝐨𝐬 𝜽 − (𝒚 − 𝒚𝒓) 𝐬𝐢𝐧 𝜽 𝒚′^ = 𝒚𝒓 + (𝒙 − 𝒙𝒓) 𝐬𝐢𝐧 𝜽 + (𝒚 − 𝒚𝒓) 𝐜𝐨𝐬 𝜽 These equations are differing from rotation about origin and its matrix representation is also different. Its matrix equation can be obtained by simple method that we will discuss later in this chapter. Rotation is also rigid body transformation so we need to rotate each point of object. Example : - Locate the new position of the triangle [A (5, 4), B (8, 3), C (8, 8)] after its rotation by 90o^ clockwise about the origin. As rotation is clockwise we will take 𝜃 = −90°.
Final coordinates after rotation are [A’^ (4, -5), B’^ (3, -8), C’^ (8, -8)].
Fig. 3.4: - Scaling.
Objects transformed with above equation are both scale and repositioned. Scaling factor with value less than 1 will move object closer to origin, while scaling factor with value greater than 1 will move object away from origin. We can control the position of object after scaling by keeping one position fixed called Fix point (𝒙𝒇, 𝒚𝒇) that point will remain unchanged after the scaling transformation.
Fixed Point
Fig. 3.5: - Fixed point scaling.
Equation for scaling with fixed point position as (𝒙𝒇, 𝒚𝒇) is: 𝒙′^ = 𝒙𝒇 + (𝒙 − 𝒙𝒇)𝒔𝒙 𝒚′^ = 𝒚𝒇 + (𝒚 − 𝒚𝒇)𝒔𝒚 𝒙′^ = 𝒙𝒇 + 𝒙𝒔𝒙 − 𝒙𝒇𝒔𝒙 𝒚′^ = 𝒚𝒇 + 𝒚𝒔𝒚 − 𝒚𝒇𝒔𝒚 𝒙′^ = 𝒙𝒔𝒙 + 𝒙𝒇(𝟏 − 𝒔𝒙) 𝒚′^ = 𝒚𝒔𝒚 + 𝒚𝒇(𝟏 − 𝒔𝒚) Matrix equation for the same will discuss in later section. Polygons are scaled by applying scaling at coordinates and redrawing while other body like circle and ellipse will scale using its defining parameters. For example ellipse will scale using its semi major axis, semi minor axis and center point scaling and redrawing at that position. Example : - Consider square with left-bottom corner at (2, 2) and right-top corner at (6, 6) apply the transformation which makes its size half. As we want size half so value of scale factor are 𝑠𝑥 = 0.5, 𝑠𝑦 = 0.5 and Coordinates of square are [A (2, 2), B (6, 2), C (6, 6), D (2, 6)]. 𝑃′^ = 𝑆 ∙ 𝑃
Final coordinate after scaling are [A’^ (1, 1), B’^ (3, 1), C’^ (3, 3), D’^ (1, 3)].
For two dimensional geometric transformation we can take value of 𝒉 is any positive number so we can get infinite homogeneous representation for coordinate value (𝒙, 𝒚). But convenient choice is set 𝒉 = 𝟏 as it is multiplicative identity, than (𝒙, 𝒚) is represented as (𝒙, 𝒚, 𝟏). Expressing coordinates in homogeneous coordinates form allows us to represent all geometric transformation equations as matrix multiplication. Let’s see each representation with 𝒉 = 𝟏
We can set up a matrix for any sequence of transformations as a composite transformation matrix by calculating the matrix product of individual transformation. For column matrix representation of coordinate positions, we form composite transformations by multiplying matrices in order from right to left.
Two successive translations are performed as:
Here 𝑷′^ and 𝑷 are column vector of final and initial point coordinate respectively.
Two successive Rotations are performed as:
Here 𝑷′^ and 𝑷 are column vector of final and initial point coordinate respectively.
This concept can be extended for any number of successive rotations. Example: Obtain the final coordinates after two rotations on point 𝑝(6,9) with rotation angles are 30𝑜^ and 60𝑜^ respectively.
Final Coordinates after rotations are 𝑝,(−9, 6).
Final Coordinates after rotations are 𝑝,(12, 12) and 𝑞,(48, 48).
General Pivot-Point Rotation
Some package provides few additional transformations which are useful in certain applications. Two such transformations are reflection and shear.
A reflection is a transformation that produces a mirror image of an object. The mirror image for a two – dimensional reflection is generated relative to an axis of reflection by rotating the object 180o^ about the reflection axis. Reflection gives image based on position of axis of reflection. Transformation matrix for few positions are discussed here.
Transformation matrix for reflection about the line 𝒚 = 𝟎 , 𝒕𝒉𝒆 𝒙 𝒂𝒙𝒊𝒔.
Fig. 3.9: - Reflection about x - axis.