Line-Plane Intersection

Author

Eric W. Weisstein
January 21, 2005

This notebook downloaded from http://mathworld.wolfram.com/notebooks/PlaneGeometry/Line-PlaneIntersection.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/Line-PlaneIntersection.html.

©2005 Wolfram Research, Inc. except for portions noted otherwise

Code

PointPlaneIntersection[{{x1_,y1_,z1_},{x2_,y2_,z2_},{x3_,y3_,z3_}},{{x4_,y4_,z4_},{x5_,y5_,z5_}}]:=Module[{t=-Det[{{1,1,1,1},{x1,x2,x3,x4},{y1,y2,y3,y4},{z1,z2,z3,z4}}]/Det[{{1,1,1,0},{x1,x2,x3,x5-x4},{y1,y2,y3,y5-y4},{z1,z2,z3,z5-z4}}]},
Point[{x4+t(x5-x4),y4+t(y5-y4),z4+t(z5-z4)}]
]

Example

PointPlaneIntersection[{{0,0,0},{0,0,5},{5,0,5}},{{1,2,1},{1,1,1}}]

Solution

soln=Solve[{Det[{{x,y,z,1},{x1,y1,z1,1},{x2,y2,z2,1},{x3,y3,z3,1}}]==0,
x==x4+t(x5-x4),
y==y4+t(y5-y4),
z==z4+t(z5-z4)},
{x,y,z,t}]

tt=t/.soln

n=Expand[Numerator[t]]

Simplify[-Det[{{1,1,1,1},{x1,x2,x3,x4},{y1,y2,y3,y4},{z1,z2,z3,z4}}]-Numerator[t]]

Simplify[Det[{{1,1,1,0},{x1,x2,x3,x5-x4},{y1,y2,y3,y5-y4},{z1,z2,z3,z5-z4}}]-Denominator[t]]

Simplify[-Det[{{1,1,1,1},{x1,x2,x3,x4},{y1,y2,y3,y4},{z1,z2,z3,z4}}]/Det[{{1,1,1,0},{x1,x2,x3,x5-x4},{y1,y2,y3,y5-y4},{z1,z2,z3,z5-z4}}]-t]