📐 3D Lines & Planes Calculator — Distance, Intersection & Angle

Pick two objects — point, line or plane — and get the shortest distance, the intersection point or line, the angle between them and the closest points, all drawn in 3D. Handles parallel, skew, coincident and perpendicular cases and shows each step.

drag to orbit · scroll / pinch to zoom · arrows + space when focused

Inputs

Results

How it works

A line is r = P + t·d (a point and a direction). A plane is n · r = k, i.e. ax + by + cz = k with normal n = (a, b, c).

Point → plane: |n·Q − k| / |n|. Point → line: |(Q − P) × d| / |d|. Line ↔ line: if the directions are parallel use point→line; otherwise the distance is |(P₂ − P₁) · (d₁ × d₂)| / |d₁ × d₂| — zero means they intersect, non-zero means they are skew.

Line ∩ plane: t = (k − n·P) / (n·d); if n·d = 0 the line is parallel (or lies in the plane). The angle between a line and a plane is asin(|n·d| / |n||d|). Plane ∩ plane: direction n₁ × n₂, angle acos(|n₁·n₂| / |n₁||n₂|).

Worked example: the distance from (1, 2, 3) to the plane x + 2y + 2z = 5 is |1 + 4 + 6 − 5| / 3 = 2.