2D Transformation-
● Manipulationdone on object.
● Translation - changing the position
tx- translation parameter with respect to x-axis
ty- translation parameter with respect to y-axis
● Scaling - Resizing the object
Sx - Scaling parameter with respect to x-axis
Sy - Scaling parameter with respect to y-axis
● Rotation - Rotate object
Rotate clockwise & anticlockwise
3.
1) Translation- changingthe position
P(x,y)-point before translation
P’(x’,y’)-point after translation
tx- translation parameter with respect to x-axis
ty- translation parameter with respect to y-axis
x’= x + tx
y’= y + ty
P’= P + T
Matrix Form- [x’ y’]=[x y]+[tx ty]
2) Scaling-Resize theobject
● Sx - Scaling parameter with respect to x-axis
● Sy - Scaling parameter with respect to y-axis
● Both if Sx & Sy in between 0 & 1
○ Point is closer to origin
○ Size decreases
● if Sx & Sy are greater than 1
○ Point is away from origin
○ Size increases
● If Sx & Sy are equal
Scaling will be done uniformly
x’=x.Sx
y’=y.Sy
Matrix form-
4) Shearing-
x-shear -y same only x distorted
y’=y
x’=x +Shx.y x shearing parameter
y-shear - x same only y distorted
x’=x
y’=y +Shy.x y shearing parameter
Homogeneous Coordinates Representation-
●Homogeneous coordinates means 2D matrix converted into 3D matrix for
simplification. (x,y) → (xh,yh,h) where h- any non-zero for simplification,
consider h=1
1) Translation- Homogeneous matrix 2) Scaling-Homogeneous matrix
representation of Translation
representation of Scaling
17.
Homogeneous Coordinates…
3) Rotation-Homogeneous matrix 2) Shearing-Homogeneous matrix
representation of Rotation
representation of Shearing
(anticlockwise)
18.
Rotation about anarbitrary point-
● We have derived rotation matrices
with respect to origin but suppose
reference point of rotation is other
than origin we must follow 3 steps-
Step 1- Arbitrary point translate to
origin (0,0) tx=-xp, ty=-yp
19.
Rotation about anarbitrary point…
Step 2- Rotate at angle
𝝷
Step 3- Translate back at same
Arbitrary position tx=xp, ty=yp
20.
Rotation about anarbitrary point…
Now let us form a combined matrix
This is transformation matrix is overall transformation matrix for rotation about
arbitrary point (xp,yp) by an angle in anticlockwise direction.
𝝷
21.
3D Transformation-
● Translation- changing the position/moving the object tx,ty,tz
● Scaling - Resizing the object/changing the size Sx,Sy,Sz
● Rotation - Rotate object with 𝝷
Rotate clockwise & anticlockwise
● Shearing - Tilting the object
x-shear, y-shear, z-shear
22.
1) 3D Translation-
tx-translation parameter with respect to x-axis x’= x + tx
ty- translation parameter with respect to y-axis y’= y + ty
tz- translation parameter with respect to z-axis z’= y + tz
23.
2) 3D Scaling-
Sx-Scaling parameter with respect to x-axis x’= x . Sx
Sy- Scaling parameter with respect to y-axis y’= y . Sy
Sz- Scaling parameter with respect to z-axis z’= y . Sz
3D Rotation aboutan arbitrary point-
● If we want to rotate a point (x,y,z) by an angle which is in space and lying
𝝷
on an arbitrary axis then we have to follow 7 steps as follows:
Step 1- Translate the arbitrary axis so that it will pass through the origin. When we
translating axis, a point also gets translated.