Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Initially the position of the shape was in (100, 100). I am rotating (say 30 degrees) the shape as shown in the image below. I have found the starting point of the rotated object. Is there a formula to find the point of the shape when the rotation was 0 degree? Any help?

enter image description here

share|improve this question
1  
What exactly do you mean by "position of the shape was in (100,100)"? What are these coordinates with respect to? –  matt Jun 11 '12 at 6:02
    
(100, 100) is the left top corner of the first rectangle. –  Karthik Jun 11 '12 at 6:04
1  
And where is (0,0)? –  matt Jun 11 '12 at 6:06
2  
And which point are you rotating about? –  Mark Bennet Jun 11 '12 at 6:15
    
Rotating w.r.t the center of the rectangle. –  Karthik Jun 11 '12 at 6:18
add comment

1 Answer

up vote 1 down vote accepted

Rotating any point $(x,y)$ on a plane about the origin by $\theta$ degrees (counter-clockwise) is given by $$ \left[ \begin{array}{c} x' \\ y' \\ \end{array} \right] = \left[ \begin{array}{cc} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \\ \end{array} \right] \left[ \begin{array}{c} x \\ y \\ \end{array} \right], $$ where $(x',y')$ denotes your new position.

share|improve this answer
    
Thanks for the help. –  Karthik Jun 11 '12 at 9:16
    
No problem! For more information on rotational matrices: youtube.com/… –  math-visitor Jun 11 '12 at 9:38
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.