POV-Ray : Newsgroups : povray.advanced-users : Math question Server Time
26 Dec 2024 00:35:30 EST (-0500)
  Math question (Message 1 to 7 of 7)  
From: David Fontaine
Subject: Math question
Date: 30 Dec 1999 14:18:33
Message: <386BADCF.DBF8F83B@faricy.net>
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] faricynet>
 |_/avid |ontaine      <ICQ 55354965>


Post a reply to this message

From: Kevin Wampler
Subject: Re: Math question
Date: 30 Dec 1999 17:35:21
Message: <386BDE29.9B06B662@tapestry.tucson.az.us>
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

From: David Fontaine
Subject: Re: Math question
Date: 30 Dec 1999 20:16:11
Message: <386C01A2.92CCEB2B@faricy.net>
> 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] faricynet>
 |_/avid |ontaine      <ICQ 55354965>


Post a reply to this message

From: Ron Parker
Subject: Re: Math question
Date: 30 Dec 1999 21:10:13
Message: <386c0f93.287614428@news.povray.org>
On Thu, 30 Dec 1999 19:06:42 -0600, David Fontaine <dav### [at] faricynet>
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

From: Nieminen Juha
Subject: Re: Math question
Date: 31 Dec 1999 05:42:46
Message: <386c88a6@news.povray.org>
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

From: David Fontaine
Subject: Re: Math question
Date: 31 Dec 1999 15:51:58
Message: <386D152F.B1490E08@faricy.net>
> 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] faricynet>
 |_/avid |ontaine      <ICQ 55354965>


Post a reply to this message

From: Kevin Wampler
Subject: Re: Math question
Date: 1 Jan 2000 18:30:41
Message: <386E8E21.A4551601@tapestry.tucson.az.us>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.