| 
|  |  |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  | If I have an arbitrary vector representing the surface normal of a plane
which passes through the origin, and an arbitrary point, how do I tell
if that point is in front or back of the plane?
--
Homepage: http://www.faricy.net/~davidf/
___     ______________________________
 | \     |_       <dav### [at] faricy net>
 |_/avid |ontaine      <ICQ 55354965> Post a reply to this message
 |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  | David Fontaine wrote:
> If I have an arbitrary vector representing the surface normal of a plane
> which passes through the origin, and an arbitrary point, how do I tell
> if that point is in front or back of the plane?
If your normal vector is <a,b,c> and the position of the point is <x,y,z>,
you should just have to test a*x+b*y+c*z, if it's positive, the point is in
front of the plane, if it's negative, the point is behind the plane, and if
it's zero, the point lies on the plane.
 Post a reply to this message
 |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  | > If your normal vector is <a,b,c> and the position of the point is <x,y,z>,
> you should just have to test a*x+b*y+c*z, if it's positive, the point is in
> front of the plane, if it's negative, the point is behind the plane, and if
> it's zero, the point lies on the plane.
Thanks! Actually I got it from by brother just a couple of minutes ago, I can't
believe it was so simple...
--
Homepage: http://www.faricy.net/~davidf/
___     ______________________________
 | \     |_       <dav### [at] faricy net>
 |_/avid |ontaine      <ICQ 55354965> Post a reply to this message
 |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  | On Thu, 30 Dec 1999 19:06:42 -0600, David Fontaine <dav### [at] faricy net>
wrote:
>> If your normal vector is <a,b,c> and the position of the point is <x,y,z>,
>> you should just have to test a*x+b*y+c*z, if it's positive, the point is in
>> front of the plane, if it's negative, the point is behind the plane, and if
>> it's zero, the point lies on the plane.
>
>Thanks! Actually I got it from by brother just a couple of minutes ago, I can't
>believe it was so simple...
The same answer, put another way, is even simpler:  If the vector is V
and the point is P, you can use vdot(V,P) to get the same result. Post a reply to this message
 |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  | You should have told that it's the dot-product of the two vectors. It's
always a good idea to tell where does a formula come from for further
reference.
-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/
Post a reply to this message
 |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  | > The same answer, put another way, is even simpler:  If the vector is V
> and the point is P, you can use vdot(V,P) to get the same result.
Yes, that was explained to me as well. When I asked my brother what dot product was,
he told me a*x+b*y+c*z...
--
Homepage: http://www.faricy.net/~davidf/
___     ______________________________
 | \     |_       <dav### [at] faricy net>
 |_/avid |ontaine      <ICQ 55354965> Post a reply to this message
 |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |  |  
|  |  | Nieminen Juha wrote:
>   You should have told that it's the dot-product of the two vectors. It's
> always a good idea to tell where does a formula come from for further
> reference.
Your right, I should have and I will try to do so more in the future.  I
actually got the formula by thinking of the inside/outside test of the
equation a*x+b*y+c*z=0 though.
 Post a reply to this message
 |  |  |  |  |  |  |  |  
|  |  |  |  |  |  |  |  |  |