Author Topic: Geometry help  (Read 2626 times)

Offline calura

  • stinky Cassowary
  • *****
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Geometry help
« on: June 07, 2013, 01:28:28 AM »
Maths nerds, lend me your helps!

Working in three dimensions and cartesion co-ords, I've got a heap of lines and a heap of planes, and I need to know the point at which a given line intersects a given plane.  I want to set up a spreadsheet where I just put it three points from the plane, and two points from the line, and it spits out the intersection point (assuming there's a unique solution).

I found this: http://en.wikipedia.org/wiki/Line-plane_intersection, and was using the algebraic method at the bottom, and it was going great, right up to here:

d = ((po-lo).n)/(l.n)

Which gives me this:

d = ||19.65|   |16.9||   | 1.000|
    ||15.35| - |12.1|| * | 1.000|
    || 9.15|   | 8.6||   |-2.382|
    -----------------------------
          | 0 |   | 1.000|
          | 0 | * | 1.000|
          | 1 |   |-2.382|

How on earth do I solve that to end up with a scalar quantity?

Offline bobmath

  • Miocene Terror Bird
  • *******
  • Posts: 100
  • Karma: +0/-0
    • View Profile
Re: Geometry help
« Reply #1 on: June 07, 2013, 07:12:33 AM »
Subtraction is done componentwise, so (19.65,15.35,9.15) - (16.9,12.1,8.6) = (2.75,3.25,0.55)

The operation you've written as * is a dot product (aka scalar product). It produces a scalar result, so just a little farther and you're there. http://en.wikipedia.org/wiki/Dot_product

BTW, if you have three points (a, b, and c) and you want n,
n = (b - a) x (c - a)
where x is the cross product. http://en.wikipedia.org/wiki/Cross_product
« Last Edit: June 07, 2013, 07:21:31 AM by bobmath »

Offline calura

  • stinky Cassowary
  • *****
  • Posts: 69
  • Karma: +0/-0
    • View Profile
Re: Geometry help
« Reply #2 on: June 08, 2013, 03:47:20 AM »
Thanks Bob :)

I've forgotten too much of my high school maths.  I thought that dot product and  cross product were the same thing, so of course I was getting a vector out on top and bottom and going whaaa?  But you cleared it right up.