Thread: 3D vector projection

1. 3D vector projection

Dear people,

I need to calculate the projection of a 3D vector, but I don't know how. Could you please help me?

There are two 3D vectors: A and B.

A and B are both on plane P.

L is a line on P, through the origin, and perpendicular to A.

How do I calculate the vector C which is the projection of B on L?

Thank you for your time!

Cornelis

2. Originally Posted by feastures
Dear people,

I need to calculate the projection of a 3D vector, but I don't know how. Could you please help me?

There are two 3D vectors: A and B.

A and B are both on plane P.

L is a line on P, through the origin, and perpendicular to A.

How do I calculate the vector C which is the projection of B on L?

Thank you for your time!

Cornelis
$\displaystyle C=proj_L B=\frac{<\mathbf{B},\mathbf{L}>}{||\mathbf{L}||}\m athbf{L}$

3. Pretty sure this is 2nd or 3rd year calculus, not pre algebra.

4. Thank!

I'm not familiar with these notations so could you please explain how this works? Also, this definition can't be complete because A is not used.

I need to write software that implements this, so I'm looking for a means of calculating this.

5. Originally Posted by feastures
Thank!

I'm not familiar with these notations so could you please explain how this works? Also, this definition can't be complete because A is not used.

I need to write software that implements this, so I'm looking for a means of calculating this.
$\displaystyle L=A\times B$

6. $\displaystyle < , >$ inner product

$\displaystyle ||\ ||$ norm

7. Wow, thanks for the quick replies!

Looking at my post, I want to apologize: Because I was too focussed on my problem, I forgot to mention that only A and B are known and that I need to calculate C (using P and L as possible intermediates). So you initial reply was complete.

I will proceed to work this out.

8. Originally Posted by dwsmith
$\displaystyle C=proj_L B=\frac{<\mathbf{B},\mathbf{L}>}{||\mathbf{L}||}\m athbf{L}$
Wait a minute: L = AxB is perpendicular to both A and B. This is not what I want: A and B must be both on plane P. L must only be perpendicular to A, and L must be on P. So C will also be on P.

Am I missing something?

9. Originally Posted by feastures
Wait a minute: L = AxB is perpendicular to both A and B. This is not what I want: A and B must be both on plane P. L must only be perpendicular to A, and L must be on P. So C will also be on P.

Am I missing something?
If two vectors are in the same plane, then a vector parallel to one will be parallel to the other. By taking the cross product of A and B, you will obtain your normal vector.