0

The line is characterized by two vectors which the lines passes through. The plane is characterized by a point and a normal vector.

I'm looking for a step-by-step guide, i.e. what needs to be done in a function in order to return the intersection point.

I'm writing the detection algorithm in Lua, but I don't believe that is all too relevant.

I realize that there are questions similar to this one on math stack exchange, and I've tried desperately to find what I need elsewhere, but every one that I've seen utilizes parametric equations instead of algebraic equations and have different characterizations of a plane which make it difficult to plug in the correct values to the equation!

  • 1
    show us what you have tried. Is your plane always aligned with an axis? – ryanpattison Jul 21 '15 at 16:45
  • I haven't written up an actual algorithm, yet. I've just been scouring the internet for an algorithm I could plug my values into. I haven't found anything like exactly what I need, hence this post. My plane is not always going to be aligned with an axis. – progatician Jul 21 '15 at 16:49
  • what are "position, depth, and length"? – sds Jul 21 '15 at 17:00
  • I edited my post to define a plane in a better way. – progatician Jul 21 '15 at 17:06
  • Let A,B - points on the line, P - point on the plane, N - normal, C - point of intersection. Then `C=A+x*(B-A)`, and the equation is `(C-P,N)=0`. Just solve it (find number x) and calculate C. – Egor Skriptunoff Jul 21 '15 at 19:32
  • Possible duplicate of [3D Line-Plane Intersection](http://stackoverflow.com/questions/5666222/3d-line-plane-intersection) – ideasman42 Jan 21 '16 at 21:53

0 Answers0