For the famous 2 dimensional coordinate system in which the x-axis is orthogonal to the y-axis, to get a point, say P, coordinates it is enough to get its orthogonal projection on the x and y axis and return the value.
But what is that point coordinates if I change the x-y coordinates to some thing like this:
the angle between the x-axis and the y-axis isn't 90deg, it is $\theta$. I mean how can I get a point coordinates in a 2 dimensional system?
Thanks in advance
I have seen two different approaches:
- to create a line that is parallel to the axis then returning the value.
- to find the orthogonal projection of the point on the axis
for the first approach
and the second one




One question is "what tools do you have?" Are you working in Cartesian coordinates, and just happen to have a new set of vectors X' and Y' that you're calling the coordinate vectors for the new system? Or are you in Euclidean geometry?
Let's assume the latter. Then the 5th postulate lets you draw a line through $P$ parallel to the Y-axis; this line meets the X-axis at some point $U_x$; similarly you can construct $U_y$. The "coordinates" of $P$ are then then $x = d(U_x, O), y = d(U_y, O)$, where $O$ is the origin, and $d$ is "distance".
Now let's assume the former: you're working in the Cartesian plane, and have two rays identified as the positive $X$ and $Y$ directions, both passing through the origin of the original cartesian coord system. Pick a point $A_x$ that's on the first ray, and distance $1$ from the origin. You can do this by taking any point $A = (s, t)$ and computing $$ A_x = (\frac{s}{\sqrt{s^2 + t^2}},\frac{t}{\sqrt{s^2 + t^2}}) $$ Do the same to find a point $A^y$ on the positive $Y$-axis.
Now suppose $P$ has coordinates $(x, y)$ in the original coordinate system. We want to write $P$ as $u A_x + v A_y$ for some $u$ and $v$, which we'll call the coordinates of $P$ in the XY coordinate system.
Writing $A_x = (a, b)$, we can let $B_x = (-b, a)$, and similarly for $B_y$.
Then you can compute $u$ as $$ u = (P - (P \cdot B_x) B_x) \cdot A_x $$ and similarly for $v$, where $(s, t) \cdot (p, q)$ is defined to be $sp + tq$, and where subtraction is defined coordinate-wise, and multiplication by a constant, like $4(5, 7)$ is defined via $(4 \times 5, 4 \times 7)$.