Asking as a programmer with very rusty Vector Maths! Any help appreciated.
I have two points (A, B) that are located on a plane in 3D space. I know the axes/normal vectors for the plane.
Given these, how do I find the 2D (X/Y) translation required to get from point A to point B, as if the plane was 2D?
Thanks
I take this to mean that you know three vectors, e.g. called $\vec u$, $\vec v$ and $\vec n$, which form an orthonormal basis such that $\vec u$ and $\vec v$ lie in the plane and $\vec n$ is its normal.
In that case, you need to project the vector $\overrightarrow{AB}=\vec B-\vec A$ onto these basis vectors. The dot product $\vec u\cdot\overrightarrow{AB}$ will give you the coordinate in direction $\vec u$, and the dot product $\vec v\cdot\overrightarrow{AB}$ will give you the coordinate in direction $\vec v$.
Since both $A$ and $B$ lie in the plane, you can also reverse this. If you have $x=\vec u\cdot\overrightarrow{AB}$ and $y=\vec v\cdot\overrightarrow{AB}$, then you get $\overrightarrow{AB}=x\vec u + y\vec v$, so the vector $\overrightarrow{AB}$ can be expressed as a linear combination of the basis vectors $\vec u$ and $\vec v$, and the coefficients you need are the ones you compute with the dot product. If your vector $\overrightarrow{AB}$ does not lie within the plane, this linear combination using only the in-plane componenst would lead to the orthogonal projection of the vector onto the plane.