0
$\begingroup$

I would like to know how to calculate the projection of a point along a specified vector (directional vector) onto a plane given by two (non collinear) vectors in 3D space.

enter image description here

Specifically, I would like to determine the scalars a and b which define the point P in $ \vec {OP} = a\cdot\vec {OA} + b\cdot\vec {OB} $ where P is the projection of C along the directional vector $ \vec v$ onto that plane. The coordinates in 3D space of O, A, B, C and $ \vec v$ are given.

$\endgroup$
  • $\begingroup$ In effect, you want to express your point $C$ in the basis $(\vec {OA},\vec {OB},\vec v)$ as $\vec{OC}=a\cdot\vec {OA} + b\cdot\vec {OB} + c\cdot\vec v$, and then just throw out the third part. $\endgroup$ – Ivan Neretin Jun 6 '16 at 20:20
  • $\begingroup$ Yes, that is correct. But how do I calculate the scalars a, b and c in that basis? $\endgroup$ – Tamori Jun 6 '16 at 21:07
  • $\begingroup$ By inverting certain matrix. That's already covered by Omnomnomnom's answer. $\endgroup$ – Ivan Neretin Jun 7 '16 at 4:42
2
$\begingroup$

Let $u = \vec{OA}, w = \vec{OB}$. Let $b = \vec {OC}$, and $x = \vec{OP}$.

Let $S = [u \quad w \quad v]$. We note that $S^{-1}x$ is simply the projection of $S^{-1}b$ onto the $xy$-plane.

However, projecting onto the $xy$-plane is easy. So, all together, we can simply compute $$ x = P_{uw}b = S P_{xy} S^{-1}b = S \pmatrix{1&0&0\\0&1&0\\0&0&0} S^{-1}b $$

$\endgroup$
  • $\begingroup$ Can't edit my original comment so I'll add a new one. Thanks for answering. I don't quite understand how I am to obtain the scalars a and b (as defined in my question) from your result, though. It seems like you have $ \vec{OP}$ determined as $ \vec{OC}$ multitplied by a matrix. $\endgroup$ – Tamori Jun 6 '16 at 21:04
  • $\begingroup$ Oh, whoops! That's even easier: just take the first two components of $S^{-1}b$. $\endgroup$ – Omnomnomnom Jun 6 '16 at 21:10
  • $\begingroup$ Ok. Will see if that works and if it does I'll mark your answer as correct. $\endgroup$ – Tamori Jun 6 '16 at 21:25
1
$\begingroup$

if the vectors $\overrightarrow{OA}$ and $\overrightarrow{OB}$ are collinear vectors then two possible cases:

a) $P$ is on the same line as $\overrightarrow{OA}$ and $\overrightarrow{OB}$, then there are infinitely many solutions.

b) $P$ does not belong to this line, then it does not solutions.

if the vectors $\overrightarrow{OA}$ and $\overrightarrow{OB}$ are not collinear, then the solution is unique given by: (after we made a good choice of landmark).

Let $\overrightarrow{OA} = (x_1, y_1,0), \overrightarrow{OB} = (x_2, y_2,0)$ and $\overrightarrow{OP} = (x, y, 0)$ then we have the matrix equation $M (\begin{array}{c} a\\ b\end{array}) = (\begin{array}{c}x \\y\end{array})$ , where $M=\left( \begin{array}{cc} x_1 & x_2 \\ y_1& y_2 \end{array} \right)$, with nonzero $det(M)$ as the vector product of $\overrightarrow{OA}$ and $\overrightarrow{OB}$ is not null vector. so the solution $(\begin{array}{c} a\\ b\end{array})$ is $M^{-1} (\begin{array}{c} x\\ y\end{array})$.

$\endgroup$
  • $\begingroup$ Thanks for your answer. As specified in my question, $ \vec{OA}$ and $ \vec{OB}$ arent't collinear. Otherwise, you don't have the complete solution as basically you're just expressing $\vec{OP}$ another way. Besides, you're not using C or $\vec{v}$. $\endgroup$ – Tamori Jun 6 '16 at 22:35
  • $\begingroup$ I think there is infinity point $C$ whose projection in the direction $\overrightarrow{v}$ is the point $P$, this points $C$ are determined by the equation $\overrightarrow{OC}=\overrightarrow{OP}+\lambda\overrightarrow{v}$. Thanks $\endgroup$ – m.idaya Jun 7 '16 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.