POV-Ray : Newsgroups : povray.general : 3d math - line intersecting a plane : Re: 3d math - line intersecting a plane Server Time
19 Nov 2024 03:38:19 EST (-0500)
  Re: 3d math - line intersecting a plane  
From: Ben Chambers
Date: 11 May 2002 15:56:06
Message: <3cdd7756@news.povray.org>
"Tor Olav Kristensen" <tor### [at] hotmailcom> wrote in message
news:3CDD71D2.497C5A52@hotmail.com...
>
> Ben Chambers wrote:
> >
> > I know I can solve this one, but I was wondering if anyone knows of any
> > quick / easy methods that might not be intuitive to me.
>
> Here is an extract from one of many such intersection macros I once made:
>
> #declare pIsect = pLine + vLine*vdot(pPlane - pLine, vPlane)/vdot(vLine,
vPlane);
>
>
> pLine is any point on the line
> vLine is any vector parallel to the line
>
> pPlane is any point on the plane
> vPlane is any vector that is normal to the plane

That's pretty good, and something along the lines of what I wanted (ie, as
simple as possible), but I think I came up with a better one:

Just because the plane is entirely abstract and won't actually be drawn,
doesn't mean I can't use trace() to find the intersection :)  (Don't you
love it when you answer your own questions, and then feel sheepish for
having asked?)

Thanks,
...Chambers


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2/8/2002


Post a reply to this message

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