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.

I have been given equations for converting from a global to local coordinate system in 2 dimensions, however with no explanation/proof as to how the equation is obtained. I realise that on occasion you just need to learn an equation and use it, but in this case I would really appreciate it if someone could help me understand what's going on. They are as follows:

$$x = X \cos \theta + Y \sin \theta$$ $$y = -X \sin \theta + Y \cos \theta$$

Where (x,y) are the local coordinates of the global point (X,Y) and $ \theta$ is the orientation of the local system relative to the global system.

share|improve this question

1 Answer 1

up vote 0 down vote accepted

This transformation can be described as the multiplication of a vector by a matrix. This matrix is a rotation matrix scaled by $(X, Y)$. Its effect is to rotate $(x,y)$ by $\theta$ (about the origin), then scale by $(X,Y)$.

share|improve this answer
    
Out of interest. The rotation matrix given in Wikipedia produces the equations: $x = X \cos \theta - Y \sin \theta$ and $y = X \sin \theta + Y \cos \theta$ is this rotation ccw as opposed to cw? –  blask Jan 11 '12 at 11:16

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.