## Line-plane intersection point

### Line-plane intersection point

Greetings,

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

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

> 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

> 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

> > 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

> 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

> 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

> 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

> 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

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

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
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}