The Dot Product Question

Started by
11 comments, last by oliii 15 years ago
I have an assignment question that I am stumped on and need someone to explain it to me like a 2 year old please. Given the plane normal and a point on the plane (eg. P1), explain the process needed to determine how far another point P3 - with coordinates (r, s, t) - is from the plane. You must draw a labelled diagram as part of your explanation.
Advertisement
You do realize that we don't do other people's homework here?

However, since you've been upfront about it, we will try to guide you.

What is it you do not understand?
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan
hey there ,

if you only asking about how far P3 from the plane (P1,n`) simple you need to find
|P3-P1|

take care,
Are you serious? What is this, a thinly-veiled double-post, or an interview question or something?
No, just an assignment question that I do not want the answer too. Just a kick start.

I am just starting out in a Game Programming unit so please bear with me.

I realise a normal is perpendicular to the plane.
I know that P1 is on the plane and that P3 (r,s,t) is not.

I just do not know where to go from here? Visually I see a vector from P1 to P3...I just do not know where to go from here?



Look into scalar projection.
So is is fair to say that since I know where P1 is on the plane and I know the P3 is at (r,s,t) then I should be able to work out the distance of P1 to where P3 lies above the plane and that length 'P3.

Since I know the length of P1 to P3 and the length of P1 to 'P3 I should be able to work out the distance of P3 from the plane using Pythagorean theorem.

Have I gone about this the right way or am I way off track?
From Wikipedia :
If only b is a unit vector, then the dot product a · b gives |a| cos(θ), i.e. the magnitude of the projection of a in the direction of b, with a minus sign if the direction is opposite.

Where a is the vector (P3-P1) and b is your plane normal.This will give the perpendicular distance of P3 to the plane.

You know what. I know you just told me the answer but I must be so thick to not understand it and I normally do not put myself down like that but in this case...

OK. Let's refer to the excellent diagram on Wikipedia you referenced and I can see how |a| cos(θ) is worked out. I know θ, since I know point P1 and P3.

I am just a little unsure about your last line.
Where a is the vector (P3-P1) - I get this part
and b is your plane normal - I know that the normal is perpendicular to the plane but am I suppose to assume something else here?

From what I know now is that I know the distance of (P3-P1) and the distance of the projection of (P3-P1) on to plane. I just unsure how you calculate the perpendicular distance of P3 to the plane.
Ok,the perpendicular distance of P3 to the plane is the projection of the vector P3-P1 onto the plane normal.
So if we call the perpendicular distance of P3 to the plane d.Then,
a = P3-P1
d = a.b

Thats it the dot product of a and b gives the perpedicular distance if b is the plane normal which is of unit length.

This topic is closed to new replies.

Advertisement