4
$\begingroup$

I have a plane defined through a point P and two 3D-vectors $\overrightarrow{X}$ and $\overrightarrow {Y}$.

I wish to convert coordinates of points on this plane between local 2D-parametric and world 3D coordinate systems.

I know the conversion from 2D Parametric to 3D is

$C(u, v) = P + u\cdot \overrightarrow {X} + v\cdot \overrightarrow {Y}$

however i have been unable to find a way for the inverse case

$C'(x, y, z)$ which should give me the parameters $u$ and $v$ for any point $(x, y, z)$ in the plane.

How does this conversion work?

1 Answers 1

3

The inverse of the 3-by-3 matrix $A$ whose columns are given by $X$, $Y$, and the cross product $X\times Y$ changes basis from $\{X,Y,X\times Y\}$ to the standard basis. Given $(x,y,z)^T=P+uX+vY$ in the plane, subtracting $P$ and multiplying $A^{-1}$ by the resulting column vector gives the column vector $(u,v,0)^T$. So one way to write the map would be $\pi(A^{-1}((x,y,z)^T-P))$, where $\pi:\mathbb{R}^3\to\mathbb{R}^2$ is projection onto the first two coordinates. To write this more explicitly, you could use the matrix $\left(\begin{matrix} 1 & 0 & 0 \\ 0 & 1 & 0 \end{matrix}\right) $ of $\pi$.

The cross product isn't really necessary, it just seemed like the most straightforward way to complete $\{X,Y\}$ to a basis for $\mathbb{R}^3$. Any vector $Z$ not in the span of $\{X,Y\}$ would do.