# Finding the position of a point after rotation: Why is my result incorrect

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?

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?

-

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.