Projecting a Point onto a Plane

madaxe2

New member
Joined
Dec 4, 2020
Messages
7
I'm trying to figure out how to project a point onto a plane, I think my mistake is in the last step can anybody see where I'm wrong, I'm getting negative values but I'm expecting positive ones. The values are correct but negative.

Thanks

Madaxe

Project a Point(B) = 0 ; 0 ; 0 onto the plane as described
A plane passing through the point (A) = 1 ; 3 ; 2 and has normal vector (N) = 6 ; 7 ; 5, then the equation of the plane is;

[MATH] Point (A) = 1 \space; \space 3 \space ; \space 2 \\ \overrightarrow{N} = 6 \space ; \space 7 \space ; \space 5 \\ Plane \space Equation = 6(x−1 \normalsize)+7(y−3 \normalsize)+5(z−2 \normalsize)=0 \\ = 6x - 6 + 7y-21+5z-10 = 0 \\ = 6x + 7y + 5z -6 -21 -10 = 0 \\ = 6x + 7y + 5z -37 = 0 \\ [/MATH]
create an arbitrary point on the plane, to do this well use Point(B) 5 ; 5 ; Z

[MATH] Point (C) = 5 \space; \space 5 \space ; \space Z \\ Plane Equation = 6x + 7y + 5z - 37 = 0 \\ = ( 6 * 5 ) + ( 7 * 5 ) + ( 5 * Z ) - 37 = 0 \\ = 30 + 35 + 5Z - 37 = 0 \\ = 5Z = - 30 - 35 + 37 \\ = 5Z = -28 \\ = Z = -28/5\\ = Z = -5.6 [/MATH]
[MATH] \overrightarrow{BA} \\ = Ax - Bx ; Ay - By ; Az - Bz \\ = 0 - 5 ; 0 - 5 ; 0 - -5.6 \\ I = -5 ; J = -5 ; K = 5.6 [/MATH]
[MATH] \overrightarrow{BA} \cdotp \overrightarrow{N} \\ = (BA\tiny{X} \normalsize N\tiny{X} \normalsize)+(BA\tiny{Y} \normalsize N\tiny{Y} \normalsize)+(BA\tiny{Z} \normalsize N\tiny{Z} \normalsize)\\ = ( -5 * 6 ) + ( -5 * 7 ) + ( 5.6 * 5 ) \\ = 30 + 35 + -28 \\ = 37 [/MATH]
[MATH] Distance = 37 / ||{N}|| \\ = \sqrt{I^2 + J^2 + K^2} \\ = \sqrt{6^2 + 7^2 + 5^2} \\ = \sqrt{36 + 49 + 25} \\ = \sqrt{110} \\ ||{N}||= 10.488 \\ 37 / 10.488 = 3.5278 [/MATH]
[MATH] Point(PRJ.) = Point(A) - (Distance * \widehat{N}) \\ \widehat{N} = \overrightarrow{N} / ||{N}|| \\ ||{N}|| = \sqrt{I^2 + J^2 + K^2} \\ = \sqrt{6^2 + 7^2 + 5^2} \\ = \sqrt{36 + 49 + 25} \\ = \sqrt{110} \\ = 10.488 \\ \widehat{N} = \overrightarrow{N} / ||{N}|| \\ = (6/10.488) ; (7/10.488) ; (5/10.488)\\ = 0.572 ; 0.667 ; 0.476 \\ Point(PRJ.) X = 0 - (3.5278 * 0.572) = -2.018\\ Point(PRJ.) Y = 0 - (3.5278 * 0.667) = -2.355\\ Point(PRJ.) Z = 0 - (3.5278 * 0.476) = -1.682\\ [/MATH]
 
Your work has too many little errors to want to follow it all. You use B where you mean C; you use I, J, K to mean at least two different things; you use equal signs in some wrong places. Possibly the main error is that what you call BA is really CB, which may be the opposite to what you intend. (I'm not sure why you need C in the first place, since you have A.)

Also, please state the formula you are using for the projection, as you learned it, with definitions for the variables, so we can check that. I don't like the use of "distance" in the formula, as you really need a signed number there.
 
I'm trying to figure out how to project a point onto a plane,
Consider the plane \(\Pi:~N\cdot \left<x-x_0,y-y_0,z-z_0\right>=0~\&~P: (a,b,c)\).
To project the point \(P\) onto the plane \(\Pi\) we write the line \(\ell(t): P+ tN\).
Now because \(\ell(t)\) parallel to the normal of the plane \(\Pi\) it is perpendicular to the plane.
Therefore if \(P'=\ell(t)\cap \Pi\) then \(P'\) is the projection of \(P\) onto \(\Pi\).
 
I'm trying to figure out how to project a point onto a plane, I think my mistake is in the last step can anybody see where I'm wrong, I'm getting negative values but I'm expecting positive ones. The values are correct but negative.

Project a Point(B) = 0 ; 0 ; 0 onto the plane as described
A plane passing through the point (A) = 1 ; 3 ; 2 and has normal vector (N) = 6 ; 7 ; 5, then the equation of the plane is;
Here is what I would do, if you want a better method rather than just correction of details in yours:

You want a point P on the plane such that vector BP is parallel to N. We can find this by projecting point A onto the line through B in direction N; the scalar projection is given by ||BP|| = BA⋅(N/||N||).

Then the vector projection is BP = ||BP|| (N/||N||).

That gives you the point P. When I do this, I get the answer you expected.
 
Morning thanks for your help, I'm a CAD specialist trying to understand my trade a little better, I'm not a math guy so I apologize.

I tried to create an excel spread sheet with the calculations in it from you last post I cant get it to work, I attached the excel sheet, but had to change the extension from .xlsx to .txt but it still opens, if you tell excel its Ok.

Point(A)132
Point(B)000
Vector(N)675
Step1Vector(BA)-1-3-2
||N||10.488
N/||N||0.57210.66740.4767
||BP||=BA*(N/||N||)-0.5721-2.0023-0.9535
Step2BP = ||BP||*(N/||N||)-0.3273-1.3364-0.4545

Any help would be awesome

Thanks

Madaxe
 

Attachments

  • Project Point on Plane.txt
    12.4 KB · Views: 2
Vector BA should be A-B, not B-A as you seem to have it.

||BP|| = BA⋅(N/||N||) is a dot product: a scalar, not a vector; you have to add your products together.

BP = ||BP|| (N/||N||) is a unit vector multiplied by that scalar, not a dot product.
 
Thank you very much, still learning the nomenclature
that was awesome,

so it works for the first example but if I try a different point to project it break again

correct answer is 10.091 ; -2.227 ; -1.591

any thoughts?

Thansk

Madaxe

Point(A)132
Point(B)122436
Vector(N)675
Step1Vector(BA)-11-21-34
Magnatude||N||10.488
Unit VectorN/||N||0.57210.66740.4767
Scalar||BP||=BA*(N/||N||)-36.518
Step2BP = ||BP||*(N/||N||)-20.891-24.373-17.409

Madaxe
 
Last edited:
i figured it out i was missing a last step to add the project point to the last step now it works for all cases

thanks

Madaxe

Point(A)132
Point(B)122334
Vector(N)675
Step1Vector(BA)-11-20-32
Magnatude||N||10.488
Unit VectorN/||N||0.57210.66740.4767
Scalar||BP||=BA*(N/||N||)-34.897
Step2BP =(||BP||*(N/||N||))+Pt(B)-19.964-23.291-16.636
Point(C) = BP + Point(B)-7.9636-0.290917.364
 
First, I realize now that I mislabeled the scalar project as a magnitude (since in this case it's negative); I was trying to avoid complicated symbols. The label doesn't make a difference to the work, though. Just change the symbol ||BP|| to "sp".

I presume you're getting the "correct answer" from some software? What does it represent, the point P itself, or something else?

If you want the coordinates of P, you've forgotten that now that point B is not the origin, vector BP is not the position vector for P. To find P itself, you need OP = OB + BP = <12, 24, 36>+<-20.891, -24.373, -17.409> = <-8.891, -0.373, 18.591>.

But that apparently isn't what you want, either.
 
Yes, I'm using a cad system to validate the answers. I'm a visual person so I'm trying to interpret the math back to visual geometry.

As soon as I changed 0,0,0 to 1,1,1 for the point to project I could see my answer was out by the delta of 0->1 so it was an easy leap to do the final step. I used the excel spread sheet that you helped me correct to test several cases it works great.

The mechanical principle of what's happening I understand, but the why and the wherefores I will be honest I'm lost.

A Vector is a line from a point to a point that can represent many things for example forces.
The magnitude the length of the line or the size of the force

Now it gets foggy

Unit Vector the (Vector / Magnitude) I know how to create it but why and what its for no idea.
Scalar (V1*V2) I know it can be used to define the projection of one vector onto another and be used in conjunction with Cos(Theta) to calculate the angle between two vectors

I can do some of these operations monkey see monkey do, but why it works no idea, unless you have a mathematical brain the underlying concepts are lost on many people.

I guess its frustrating for mathematicians to work with people who struggle with the basic principles

I really appreciate your help and patients.

Madaxe
 
Yes, I'm using a cad system to validate the answers. I'm a visual person so I'm trying to interpret the math back to visual geometry.

As soon as I changed 0,0,0 to 1,1,1 for the point to project I could see my answer was out by the delta of 0->1 so it was an easy leap to do the final step. I used the excel spread sheet that you helped me correct to test several cases it works great.

I see you corrected yourself before I wrote (because what you wrote wasn't yet visible).

The mechanical principle of what's happening I understand, but the why and the wherefores I will be honest I'm lost.

A Vector is a line from a point to a point that can represent many things for example forces.
The magnitude the length of the line or the size of the force

Now it gets foggy

Unit Vector the (Vector / Magnitude) I know how to create it but why and what its for no idea.
Scalar (V1*V2) I know it can be used to define the projection of one vector onto another and be used in conjunction with Cos(Theta) to calculate the angle between two vectors

I can do some of these operations monkey see monkey do, but why it works no idea, unless you have a mathematical brain the underlying concepts are lost on many people.

I guess its frustrating for mathematicians to work with people who struggle with the basic principles
It's only frustrating when people don't want to admit they need help, or don't make the effort to try. I love finding ways to explain ideas to people who aren't ready for the deep explanations, but want to learn; I suppose that's why I teach and tutor at a community college rather than being a real mathematician.

Here's a two-dimensional representation of what we've done:

1607201951508.png

We want to find point C, which lies on the plane through given point A that is normal to vector n, and is in the direction of vector n from a given point B.

We divide vector n by its length to get a unit vector I've called "unitn" here (commonly denoted as [MATH]\hat{n}[/MATH]), which has length 1; that just makes it easier to think about other lengths.

Looking at right triangle ABC, we see that [MATH]\cos(\theta)=BC/BA[/MATH], so [MATH]BC = BA \cos(\theta) = u\cdot \hat{n}[/MATH], which is the scalar projection; this is as simple as it is because I used a unit vector.

So now I have the length of BC and its direction, so I just multiply the unit vector by the desired length to get the vector of that length in that direction. (Actually, what I just called the "length" of BC is really a "signed length", because the dot product could be negative.)

I don't expect you to follow everything just from my explanation of my thinking; but I tend to think visually, and this picture is how I thought about the problem. (I could just know the formula for the vector projection, but I prefer to think it out this way, both because I don't trust my memory, and because understanding is more fun, and often more helpful for students.)
 
I see you corrected yourself before I wrote (because what you wrote wasn't yet visible).


It's only frustrating when people don't want to admit they need help, or don't make the effort to try. I love finding ways to explain ideas to people who aren't ready for the deep explanations, but want to learn; I suppose that's why I teach and tutor at a community college rather than being a real mathematician.

Here's a two-dimensional representation of what we've done:

View attachment 23504

We want to find point C, which lies on the plane through given point A that is normal to vector n, and is in the direction of vector n from a given point B.

We divide vector n by its length to get a unit vector I've called "unitn" here (commonly denoted as [MATH]\hat{n}[/MATH]), which has length 1; that just makes it easier to think about other lengths.

Looking at right triangle ABC, we see that [MATH]\cos(\theta)=BC/BA[/MATH], so [MATH]BC = BA \cos(\theta) = u\cdot \hat{n}[/MATH], which is the scalar projection; this is as simple as it is because I used a unit vector.

So now I have the length of BC and its direction, so I just multiply the unit vector by the desired length to get the vector of that length in that direction. (Actually, what I just called the "length" of BC is really a "signed length", because the dot product could be negative.)

I don't expect you to follow everything just from my explanation of my thinking; but I tend to think visually, and this picture is how I thought about the problem. (I could just know the formula for the vector projection, but I prefer to think it out this way, both because I don't trust my memory, and because understanding is more fun, and often more helpful for students.)

That's a great way to show it, can I add this to my web site?

Merry Christmas

Madaxe
 
Top