# Simple coordinate transformation question

1. Jan 18, 2014

### iScience

http://i.imgur.com/MDigPh5.png

if i have my original coordinate (white) and i am transforming this into the red coord. , could someone explain to me why y=y'cos$\phi$ is incorrect and why y'=ycos$\phi$ is correct?

2. Jan 18, 2014

### HallsofIvy

Staff Emeritus
Neither of those is correct unless you are just giving part of the formula- in which case both are correct! y' depends on both y and z and y depends on both y' and z'.

Given any point in the plane, drop perpendiculars from the point to the y and y' axes. The angle at the point is $\phi$, the distance from the point to the foot of the perpendicular to the y' axis is z' and the distance from the point to the foot of the perpendicular to the y axis is z. Similarly, the distance from the origin to the foot of the perpendicular to the y-axis is y and the distance from the origin to the foot of the perpendicular to the y'- axis is y'.

The distance from the foot of the y-axis to the intersection of that perpendicular is $y tan(\phi)$. The length of the rest of that perpendicular is the hypotenuse of that right triangle and so is $\frac{z'}{cos(\phi)}$. Then $z= y tan(\phi)+ \frac{z'}{cos(\phi)}$. Multiply both sides by $cos(\phi)$ to get $z cos(\phi)= y sin(\phi)+ z'$ so that $z'= z cos(\phi)- y sin(\phi)$. Similarly, $y'= z sin(\phi)+ y cos(\phi)$.

You can solve those two equations for y and z or simply replace $\phi$ with $-\phi$ (the opposite of "rotating through angle $\phi$" is "rotating through angle $-\phi$"). Since $sin(-\phi)= -sin(\phi)$ and $cos(-\phi)= cos(\phi)$ we can just change the sign in front of the sines: $y= -z' sin(\phi)+ y' cos(\phi)$ and $z= z' cos(\phi)+ y' sin(\phi)$.

Last edited: Jan 18, 2014