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.

I have a plane defined through a point P and 2 3d-vectors Xdir and yDir.

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*XDir + v*YDir

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer

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.