Find where an infinite 3D line meets a plane. Enter the line origin P, its direction vector D, the plane normal n and the constant k in n·X = k. All inputs are numeric abstract coordinates with unit 1. The calculator returns the line parameter t and the intersection coordinates x, y and z.
Use any point on the line as P and a nonzero direction vector as D. For a plane ax + by + cz = k, enter n = (a, b, c). If your equation is ax + by + cz + d = 0, enter k = −d. The normal must be nonzero; neither vector needs to be normalized.
The parameter t describes movement from P in multiples of D. It is not generally a distance. Negative t values are valid for this infinite-line calculation. The calculator does not classify ray or segment hits.
Substituting X = P + tD into n·X = k gives n·P + t(n·D) = k. Rearranging gives t = (k − n·P)/(n·D). The dot products are evaluated as three component products added together. This follows the University of Alaska Fairbanks intersection derivation.
Take P = (1, 2, 3), D = (2, −1, 1) and the plane x + y + z = 10. Here n·P = 6 and n·D = 2, so t = (10 − 6)/2 = 2. The intersection is P + 2D = (5, 0, 5). Substitution into the plane equation confirms 5 + 0 + 5 = 10.
When n·D = 0, division by zero makes t and all three intersection coordinates unavailable. For nonzero D and n, distinguish two cases:
- If k − n·P ≠ 0, the line is parallel to the plane and never intersects it.
- If k − n·P = 0, the entire line lies in the plane. Every point on the line is an intersection, so there is no unique t or intersection point.
Unavailable results alone do not distinguish these cases. A zero direction vector does not define a line, and a zero normal does not define a plane; correct those inputs before interpreting the result. A denominator very close to zero can make the computed intersection highly sensitive to rounding.
