-1
$\begingroup$

I am using the following formula to calculate the position of a point after rotation in my web application.

x' = xcos(0) - ysin(0) y' = xsin(0) + ycos(0) 

But where on a graph is zero degrees in Mathematics? In the following image can you tell me where zero degrees is(is it at Point A or Point B?) If it turns out that zero degrees is at point B then I will need to add 90 degrees to all my degree values in order to use the above function, correct?

enter image description here

  • 0
    Is there a connection between this question and [this other question](http://math.stackexchange.com/questions/122850/where-is-zero-degrees-on-a-graph) posted a quarter of an hour earlier? It sure looks like it; even the $\theta$ written like a $0$ is the same.2012-03-21

1 Answers 1

1

The argument of the trigonometric functions in your formulas is not the absolute angle of a point but the relative angle by which the point (x',y') is rotated with respect to the point $(x,y)$. Thus you don't need to know where the angle zero is in absolute terms; all you need to know is whether a positive angle represents a clockwise or a counterclockwise rotation. This you can find out e.g. by rotating the point $(1,0)$ by $\pi/2$ (or $90^\circ$); the result is $(0,1)$, so the rotation is counterclockwise.

If you do ever need to know where the angle $0$ is in absolute terms, it's usually taken to be along the positive $x$ axis, with positive angles between $0$ and $\pi/2$ representing points in the first quadrant, i.e. with positive $x$ and $y$ coordinates.

By the way, I disagree with your claim that "in programming, zero degrees is at point $A$". I think Java counts as programming, and it uses the mathematical convention, in which zero degrees corresponds to $B$; see e.g. the API for java.awt.Graphics.drawArc.