Intersection of a plane and a line

Written by Paul Bourke
August 1991


This note will illustrate the algorithm for finding the intersection of a line and a plane using two possible formulations for a plane.

Solution 1

The equation of a plane (points P are on the plane with normal N and point P3 on the plane) can be written as

N dot (P - P3) = 0

The equation of the line (points P on the line passing through points P1 and P2) can be written as

P = P1 + u (P2 - P1)

The intersection of these two occurs when

N dot (P1 + u (P2 - P1)) = N dot P3

Solving for u gives

Note

Solution 2

A plane can also be represented by the equation

A x + B y + C z + D = 0

where all points (x,y,z) lie on the plane.

Substituting in the equation of the line through points P1 (x1,y1,z1) and P2 (x2,y2,z2)

P = P1 + u (P2 - P1)

gives

A (x1 + u (x2 - x1)) + B (y1 + u (y2 - y1)) + C (z1 + u (z2 - z1)) + D = 0

Solving for u

Note