ROTATION IN 2D TRANSFORMATION


ROTATION:




                           A two-dimensional rotation is applied to an object by repositioning it along a circular path within the xy plane. to come up with a rotation, we specify a rotation angle 0 and also the position (x, y) of the rotation point (or pivot point) about which the article is to be rotated.

Positive values for the rotation angle define counterclockwise rotations about the pivot point, and negative values rotate objects within the clockwise direction. This transformation also can be de- scribed as a rotation a few rotation axis that's perpendicular to the xy plane and passes through the pivot point.

The original coordinates of the purpose in polar coordinates are
x = r cos Φ, y = r sin Φ

Rotation is expressed relative to origin. This also means that the sides in figures that are rotated create new angles with the axes after a rotation. We assume that the positive rotation angle is counterclockwise.

Rotation defined by 

 

   x = r·cos(Φ)
   y = r·sin(Φ)


Rotating the shape by Origin (or) any other points.

   x' = r·cos(Φ + θ)

   y' = r·sin(Φ + θ)



BY BASE OF TRIGONOMETRIC FORMULA USING FOR SUBSTITUTION,



                 sin(A+B) = sinA.cosB + cosA.sinB

                 cos(A+B) = cosA.cosB - sinA.sinB






BY SUBSTUITING,



x'   = r[cos Φ.cos θ - sin Φ.sin θ]

      = r.cos Φ.cos θ – r.sin Φ.sin θ]

 x'  = x.cos θ – y.sin θ





y'   = r[sin Φ.cos θ + cos Φ.sin θ]

      = r.sin Φ.cos θ + r.cos Φ.sin θ]

 y'  = y.cos θ + x.sin θ



AT FINALLY,

 x'  = x.cos θ – y.sin θ
 y'  = y.cos θ + x.sin θ




MATRIX REPRESENTATION


P' = R.P (Based on origin)


          [ x' ]                          [ cos θ    – sin θ]       [ x ]



          [ y' ]                 =       [ sin θ      cos θ ]       [ y ]



ROTATION BASED ON FIXED POINT






                 x' = xr + (x - xr).cos θ – (y - yr).sin θ

                 y' = yr + (x - xr).sin θ + (y - yr).cos θ

Comments

POPULAR POSTS

POPULAR POSTS