|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
...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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Take the equation of the plane and the equation of the line
(parametrically), and solve them as a system of equations.
For instance...
plane: 2x +4y +5z = 0
line:
x=t
y=2t
z=3t+5
then you plug in x y and z into the plane's equation, and solve for t...
2*t + 4*2*t + 5*3*t + 5*5 = 0
25*t = -25
t = -1
then, once you know t, just plug it in to the line's equation to find the
point of intersection:
x = -1
y = 2*-1 = -2
z = 3*-1 + 5 = 5 - 3 = 2
so the intersection is at <-1,-2,2>. Unless I messed something up, which is
entirely possible...
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
Tor Olav
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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.
I forgot to mention that with POV-Ray v3.5 the quickest
method should be to use the trace() keyword.
Tor Olav
Post a reply to this message
|
|
| |
| |
|
|
From: Ben Chambers
Subject: Re: 3d math - line intersecting a plane
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> I forgot to mention that with POV-Ray v3.5 the quickest
> method should be to use the trace() keyword.
Quickest to code, yes... is it really faster to calculate though? Especially
when the plane has to be created as an object?
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Slime wrote:
>
> > I forgot to mention that with POV-Ray v3.5 the quickest
> > method should be to use the trace() keyword.
>
> Quickest to code, yes... is it really faster to calculate though? Especially
> when the plane has to be created as an object?
Hmmmm...
I haven't used the trace keyword much, so I don't know.
I should probably also mention that I believe the trace
method requires that the line vector points towards the
plane. (Please correct me if I'm wrong about this.)
While one can overcome this problem with some vector
calculations, I'm quite sure that the parsing time for
this will be longer than for the expression I suggested.
Tor Olav
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Did ya make any macros about line segment intersecting?
Tor Olav Kristensen wrote:
> 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
>
> Tor Olav
--
Have Fun!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |