Rotation of a point P by some angle θ

"Rotation of a point P by some angle θ" - This concept gave me some hard time. Especially because I failed to understand the proof for its formula. And I was poor at remembering formulae.

So... I thought of coming up with some simple explaination about this concept and its formula with a reasonable simple to understand explaination.

Lets consider the problem. We have a point P(x, y). When the line segment OP is rotated by an angle θ, the rotated line segment is represented by OP'.

Now, the solution is to find P' in terms of x, y and θ



To solve this, lets assume that...
the length of the line segment OP = R ... and ...
lets assume that OP makes an angle θ0 with the positive X-axis.

If we draw a circle of radius R and center at the origin, we get the following graph.

From the above picture, we can easily say that both P and P' are two points on the perimeter of this circle. We can write that....
x = R*cos(θ0)
y = R*sin(θ0)
x' = R*cos(θ0 + θ)
y' = R*sin(θ0 + θ)


Now, recall that...
sin(A+B) = sin(A)*cos(B) + cos(A)*sin(B)
cos(A+B) = cos(A)*cos(B) - sin(A)*sin(B)


So, we get...

x' = R*cos(θ0 + θ)
x' = R*(cosθ0*cosθ - sinθ0*sinθ)
x' = R*cosθ0*cosθ - R*sinθ0*sinθ
x' = x*cosθ - y*sinθ

Similarly...

y' = R*sin(θ0 + θ)
y' = R*(sinθ0*cosθ + cosθ0*sinθ)
y' = R*sinθ0*cosθ + R*cosθ0*sinθ
y' = y*cosθ + x*sinθ


SUMMARY


When a point P(x, y) is rotated by and angle θ, the transformed point P' = (x' , y') where...

x' = x*cosθ - y*sinθ
y' = x*sinθ + y*cosθ

This can be conveniently represented in the matrix form as follows...



... or ...



KRK Jaya Prakash © 2013