Find the intersection of a line with a plane: Difference between revisions
Content added Content deleted
m (→{{header|APL}}) |
m (→{{header|APL}}) |
||
Line 25: | Line 25: | ||
⍝ The intersection I belongs to a line defined by point L and vector V, translates to: |
⍝ The intersection I belongs to a line defined by point L and vector V, translates to: |
||
⍝ A real parameter t exists, that satisfies I = L + tV |
⍝ A real parameter t exists, that satisfies I = L + tV |
||
⍝ I belongs to the plan defined by point P and normal vector N. This means that any two points of the plane make a vector |
⍝ I belongs to the plan defined by point P and normal vector N. This means that any two points of the plane make a vector |
||
⍝ normal to vector N. As I and P belong to the plane, the vector IP is normal to N. |
|||
⍝ This translates to: The scalar product IP.N = 0. |
⍝ This translates to: The scalar product IP.N = 0. |
||
⍝ (P - I).N = 0 <=> (P - L - tV).N = 0 |
⍝ (P - I).N = 0 <=> (P - L - tV).N = 0 |