Rotation: by Amjad Khan Khalil Amjad@aup - Edu.pk Amjad@kardan - Edu.af

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 13

Rotation

By
Amjad Khan Khalil
[email protected]
[email protected]
What is Rotation?
 The movement of an object along a curve on
a circular path is known as rotation.
Let we have a point
laying in the xy-plane
making an angle Ф with P (x ,y )
2 2 2
y-axis
the x-axis. Then its polar P (x ,y )
1 1 1
coordinates are θ
x1 = r cosФ 1 Ф

y1 = r sinФ 2 x-axis
Con’t
 Where r is the distance of the point from
the origin.
 Now point p1(x1,y1) is rotated through an
angle θ to point p2(x2,y2).
 Thus using geometric identities we have
x2=r cos(θ+ Ф) 3
y2=r sin(θ+ Ф) 4
Con’t
 By expanding eq-3 and eq-4 we have

x2=r cosθ cosФ – r sinθ sinФ


y2= r sinθ cosФ + r sinФ cosθ
By substituting the values from q-1 and eq-2 we
have
x2= x1 cosθ – y1 sinθ
y2= x1 sinθ + y1 cosθ
Con’t
 In matrix form we can write

P2 = R(θ) . P1
Con’t
 It should be noted that the positive angle will
be measured anti clock wise that is from P1 to
P2 . But if the angle is negative then it is
measured clock wise and then the geometric
identities will become
Cos(- θ)= Cos θ
Sin(- θ)=-Sin θ
And the final equation will be modified
accordingly.
Examples.
Example-1: A point P1(8,6) is rotated at an angle
of 30° in polar coordinate system to new
position. Find out the Coordinates of the new
position of the point. Also draw the accurate
diagram.
Example-2: A point P1(7,10) is making an angle of
50° with x-axis initially. Let this point is rotated
at an angle of 45°. Find out the new position of
the point. Also draw the accurate diagram.
Examples.
 A point P(10,0) is rotated at an angle of
90° in coordinate system. Find out the
new position of the point along with the
suitable diagram.
 A point P(0,7) is rotated an angle of 90°
in coordinate system clockwise. Find out
the new position along with the suitable
diagram.
What is Scaling?
 The transformation used to alter the size of an
object is called scaling.
 By scaling the size of an object can either be
enlarged or decreased.
 This operation can be carried out for polygon
by multiplying the coordinates value (x1,y1) for
each boundary vertex by scaling factors sx and
sy to produce transformed coordinates (x2,y2).
Con’t
x2=x1 . Sx
y2=y1 . Sy
In matrix form we can write

Sx 0

0S Sy
x

P2 = S . P 1
Con’t
 If S>1 then object size will increase
 If S<1 then object size will decrease
 If S = 1 then object size remains
unchanged.
 If Sx = Sy then such a scaling is known
as uniform scaling.
 If Sx ≠ Sy then such a scaling is known
as differential scaling.
Examples
 A polygon having three Vertices P1(2,2)
P2(6,2) and P3(4,6). If the scaling factors 1 and 2
multiplied with P3 then find out the transformed
vertex P3 along with the accurate diagram.
 A polygon having four vertices, P1(3,2) P2(3,10),
P3(10,2) and P4(10,10). If the value of scaling factor
along x-axis is 1 and along y-axis is 2 and the scaling
performed on P3 then find out the transformed
polygon with accurate diagram.
Example-3
 A polygon having four vertices P1(2,2),
P2(10,2), P3(6,8) and P4(16,8). If the
scaling factor along x-axis and y-axis is
-2, 1 respectively and the scaling
performed on P1 then find out the
transform coordinates along with
accurate diagram.

You might also like