Line-plane intersection point

Line-plane intersection point

Post by Sean Hamilto » Mon, 11 Mar 2002 00:02:10



Greetings,

A while back, I had a discussion with Broeker about reflecting a line about
a plane. He seemed to hint that it was possible to compute the point of
intersection of a line and plane without linear algebra (gack!), however
various Google queries didn't turn anything relevant up.

Ideally, I have my line defined as two points, and my plane defined as a
normal and a distance.

TiA,

sh

 
 
 

Line-plane intersection point

Post by Sean Hamilto » Mon, 11 Mar 2002 00:57:07


Quote:> Whatever in the world could you mean by "without linear algebra
> (gack)"?

It could be my substandard "use simple versions of the real thing for wee
grade 10 students" education, but as I recall, linear algebra presented us
with some equation in which multiple variables were unknown, and the entire
thing had to be solved at once. It involved some tricks where two instances
of the equation were added together, or something. Simple to the veterans
around here I'm sure.

It may be my poor knowledge of the terminology, or inability to spot that
which is defined by said terminology in some equation or the like, but
Broeker's method seemed a *lot* simpler than Bourke's.

sh

 
 
 

Line-plane intersection point

Post by Hans-Bernhard Broeke » Mon, 11 Mar 2002 01:04:47



> A while back, I had a discussion with Broeker about reflecting a line about
> a plane. He seemed to hint that it was possible to compute the point of
> intersection of a line and plane without linear algebra (gack!),

I'm almost certain you must have misunderstodd me badly there.  

--

Even if all the snow were burnt, ashes would remain.

 
 
 

Line-plane intersection point

Post by Sean Hamilto » Mon, 11 Mar 2002 15:43:12



> You'll find it in the FAQ to this newsgroup, item 5.05

Yes, I found that.

x = x1 + (x2 - x1)*t = x1 + i*t
y = y1 + (y2 - y1)*t = y1 + j*t
z = z1 + (z2 - z1)*t = z1 + k*t

    - (a*x1 + b*y1 + c*z1 + d)
t = ---------------------------
       a*i +  b*j  + c*k

Correct, yes?

Now. Pardon my ignorance, but what are i, j, k? They seem to just show up. I
suppose this comes from a misunderstanding of the first part, what is
happening there?

I'm guessing I'm solving for t, which indicates where along the initial line
the intersection is?

TiA,

sh

 
 
 

Line-plane intersection point

Post by Kenneth Sloa » Mon, 11 Mar 2002 17:08:14




> > You'll find it in the FAQ to this newsgroup, item 5.05

> Yes, I found that.

> x = x1 + (x2 - x1)*t = x1 + i*t
> y = y1 + (y2 - y1)*t = y1 + j*t
> z = z1 + (z2 - z1)*t = z1 + k*t

>     - (a*x1 + b*y1 + c*z1 + d)
> t = ---------------------------
>        a*i +  b*j  + c*k

> Correct, yes?

> Now. Pardon my ignorance, but what are i, j, k?

i = (x2 - x1)
j = (y2 - y1)
k = (z2 - z1)

--

Computer and Information Sciences                       (205) 934-2213
University of Alabama at Birmingham                 FAX (205) 934-5473
Birmingham, AL 35294-1170   http://www.cis.uab.edu/info/faculty/sloan/

 
 
 

Line-plane intersection point

Post by Sean Hamilto » Mon, 11 Mar 2002 18:36:03



> i = (x2 - x1)
> j = (y2 - y1)
> k = (z2 - z1)

Well. In part due to this nudge, I seem to have it working. The only problem
is that it messes up when the line starts on the back side of the plane.
Need I test which side of the plane the line is originating from, and flip
the sign of the numerator as necessary, or have I somehow messed this up?

TiA,

sh

 
 
 

Line-plane intersection point

Post by Sean Hamilto » Mon, 11 Mar 2002 18:40:16



> Well. In part due to this nudge, I seem to have it working. The only
problem
> is that it messes up when the line starts on the back side of the plane.

Forget it, fixed.

sh

 
 
 

Line-plane intersection point

Post by Sean Hamilto » Mon, 11 Mar 2002 21:11:15



> Forget it, fixed.

Forget that, it's broken.

A line from (0, 20, 0) to (0, -20, 0), with an up-facing plane with a d of
10. I would expect the point of intersection to be (0, 10, 0). Instead, it
is (0, -10, 0).

---
#!/usr/bin/perl

$xone = 0;
$yone = 20;
$zone = 0;

$xtwo = 0;
$ytwo = -20;
$ztwo = 0;

$a = 0;
$b = 1;
$c = 0;
$d = 10;

$i = $xtwo - $xone;
$j = $ytwo - $yone;
$k = $ztwo - $zone;

$t = - ($a * $xone + $b * $yone + $c * $zone + $d) / ($a * $i + $b * $j + $c
* $k);
print ('(', $xone + $i * $t, ', ', $yone + $j * $t, ', ', $zone + $k * $t,
")\n");
---

Output: (0, -10, 0)

TiA,

sh

 
 
 

Line-plane intersection point

Post by Sean Hamilto » Tue, 12 Mar 2002 12:31:22



> This says that the equation of your plane is
> y + 10 = 0
> or
> y = -10

> I think you may need to reveiw your 9th grade algebra.

I see, so d is the negative? That makse sense, but then you'd think the more
common writing would be Ax + By + Cz - d = 0...

Oh well. Noted for future.

sh

 
 
 

Line-plane intersection point

Post by Full Nam » Tue, 12 Mar 2002 16:23:50


On Sun, 10 Mar 2002 20:22:42 -0800, Ron Levine




>>> This says that the equation of your plane is
>>> y + 10 = 0
>>> or
>>> y = -10

>>> I think you may need to reveiw your 9th grade algebra.

>>I see, so d is the negative? That makse sense, but then you'd think the more
>>common writing would be Ax + By + Cz - d = 0...

>>Oh well. Noted for future.

>No the equation is commonly written
>    ax + by + cz + d = 0
>Your case has a=c=0, b=1, d=10, so
>    y + 10 = 0
>    y = -10

>This has devolved into a discussion of 9th grade algebra, not
>appropriate for this newsgroup.

>Good-bye

 
 
 

1. Point of intersection between line and plane

Hiya!

I'm trying to calculate the point of intersection between a line and a
plane.  I looked in the FAQ in section 5.05 and found my plane is
defined by 3 points, not (a*x + b*y + c*z + d = 0) as in the Faq.  I've
totally forgotten how to convert my 3 points into the plane equation.
(blush :)

So could someone help me with calculating the 3d point of intersection
between a line, defined by 2 3d points, and a plane, defined by 3 3d
points?  Any help is greatly appreciated.

Also, the FAQ in section 5.05 says,

    ...
    Then just substitute these into the plane equation. You end up
    with:

        t = - (a*x1 + b*y1 + c*z1 + d)/(a*i + b*j + c*k)

    When the denominator is zero, the line is contained in the plane
    if the numerator is also zero (the point at t=0 satisfies the
    plane equation), otherwise the line is parallel to the plane.
    ...

What the heck is that last paragraph trying to say?  Is it just, if
(num==0 && denom==0) the line is parallel to the plane else there is a
valid intersection?

Thanks for any help!

Arn

2. Disk around a sphere

3. Point of intersection line of two planes

4. Question about TV Graphic Production

5. Intersection of Point-line and line....

6. Circles of confusion / KPT blur

7. Finding the 4 intersection points of plane/sphere

8. filer transfer

9. How to get intersection points between planes.

10. Points of intersection plane/box ?

11. 3 plane intersection point

12. REQ 3d line/plane intersection

13. line and plane intersection w.r.t Shadowing.