I have a similar question to this post, except that I don't know the rotation angle. I just need to put the upper left corner of the rotated rectangle to (Xmin, Ymin). How can I calculate the rotated position B from the original position A?


  • $\begingroup$ I suggest to put the rectangle in the middle of the image and actually rotate around the center of the rectangle. That would make calculations a lot easier (its only $(r\cos \alpha, r\sin \alpha)$ where $r$ is the distance from the center to the corner and $\alpha$ a respective angle to a corner. $\endgroup$ – Peter Patzt Jul 2 '11 at 19:11
  • $\begingroup$ Oh, never thought of it. Thanks, will do! $\endgroup$ – springrolls Jul 2 '11 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.