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.

Can you please help me to figure out a way to obtain global coordinates of a point which is defined within local coordinates system.

Known:
(x,y) origin of the local coordinate system.
angle of the local coordinates system relative to global coordinate system.
(x,y) coordinate of the point with in local coordinate system.

Looking for:
(x,y) coordinate of the point with in global coordinate system.

Thank you so much!

Oleg

share|improve this question
add comment

1 Answer

Take $x,y$ the global coordinates, $x^\prime,y^\prime$ the local coordinates, $(h,k)$ the global coordinates of the local system's origin, and $\varphi$ the anticlockwise angle from the global system's horizontal ($x$) to the local system's "horizontal" ($x^\prime$).

What is needed, then, to convert from $(x^\prime,y^\prime)$ to $(x,y)$ is to 1. shift the origin; and 2. rotate by $\varphi$ clockwise. This sequence is most easily expressed in matrix-vector notation:

$$\begin{pmatrix}x\\y\end{pmatrix}=\begin{pmatrix}\cos\,\varphi&\sin\,\varphi\\-\sin\,\varphi&\cos\,\varphi\end{pmatrix}\cdot\left(\begin{pmatrix}x^\prime\\y^\prime\end{pmatrix}-\begin{pmatrix}h\\k\end{pmatrix}\right)$$

or explicitly,

$$\begin{align*}x&=(x^\prime-h)\cos\,\varphi+(y^\prime-k)\sin\,\varphi\\y&=-(x^\prime-h)\sin\,\varphi+(y^\prime-k)\cos\,\varphi\end{align*}$$

share|improve this answer
add comment

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.