Normal location on plane of point near to plane?

Started by
2 comments, last by Stevieboy 18 years, 4 months ago
Hi, what I mean is if you had a point near a plane how would you find where on a plane that points normal would be, -where would the point project to on the plane? I think this might be similar to trying to find a point on a triangle?. What I'm trying to do is find out how to plot points on a plane, on the ground a point is just a distance x and a distance z, but if the ground was tilted, and to keep those points normal to it then you would have to consider y values as well? Any ideas?
Advertisement
You are looking for the projection of a point on a plane. This can be done using vector maths (which I would be happy to explain, but the use is more suited to paper-and-pencil). Let's call it a recourse for later if you have any trouble with anything else.

Projection matrices exist for exactly the purpose you are looking for. You need to multiply your vector coordinates with a projection matrix, and the resulting coordinates will be your projection on the plane. Take a look here.
Quote:Original post by Stevieboy
Hi, what I mean is if you had a point near a plane how would you find where on a plane that points normal would be, -where would the point project to on the plane? I think this might be similar to trying to find a point on a triangle?.

What I'm trying to do is find out how to plot points on a plane, on the ground a point is just a distance x and a distance z, but if the ground was tilted, and to keep those points normal to it then you would have to consider y values as well? Any ideas?

Method depends to how Your plane is specified. Usually, plane equation is given by either N*point+d=0 or N*point-d=0 , where N is plane normal, and d is distance from plane to 0,0,0

To project point onto plane, use
Pproj=P-N*(N dotproduct P - d)
or
Pproj=P-N*(N dotproduct P + d)
depending to which plane equation You have used. (assuming the plane normal is unit length, i.e. normalized)
Hi agian thanks for the replys, I haven't done anything much with planes, or 3d calculations ect before, also I don't really understand the way they are explained (I didn't really do proper high school maths), umm, I did get a top grade in Physics though, lol.
I figured out some of the plane stuff just by experimenting & literally placing spheres etc at all the relative points and just seeing how they work (plus with the help of some d3dx functions), so in it came down to; the normal in the plane equation (or d), equates to a distance in 3d, and the a, b & c amount to the angle it should be at. This would get the nearest point of the plane to the origin.

This topic is closed to new replies.

Advertisement