Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am attempting to calculate the position of a point after it has been rotated

I have been using an algorithm but I am getting incorrect values which makes me think I am using the incorrect algorithm or incorrect values.

What algorithm and values should I use to find the position of the green dot? enter image description here

My calculation is here:

x  = -6 
y  = 349
0  = -25

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

x' = (-5.44) - (-147.49)
y' = (2.54) + (316.30)

x' = 142.05
y' = 318.84
// Isn't that really wrong shdn't it be around 0,349 for the answer?
share|cite|improve this question

Your equations for $x', y'$ are for rotation around the origin, but your drawing has the rotation around the center of the square which appears to be about 150 units away from the red dot. If the center of the square is at $(x_c,y_c)$ you should have $x'=(x-x_c)\cos \theta +x_c - (y-y_c)\sin \theta, y'=(y-y_c)\cos \theta +y_c + (x-x_c) \sin \theta$. In your drawing, the square looks much smaller than 100 units in size.

share|cite|improve this answer

Your Answer


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.