This post derives a formula to find the intersection point of three planes that is easy and efficient to implement. It’s built on the knowledge of previous posts. This is used in computer graphics, for example, to find the corners of a view frustrum given its planes.

Given three planes in implicit form, the system of linear equations is:

The system of linear equations can be expressed in matrix form and after some algebraic manipulations we find the formula for the interesection point:

The inverse of the 3x3 matrix can be calculated like explained in a previous post. If the matrix is not invertible, then the three planes don’t interesect at a single point.

Pseudo-code:

vec3 intersection_point(Plane p1, Plane p2, Plane p3)
{
	Matrix3x3 m;
	m.row(0) = p1.n;
	m.row(1) = p2.n;
	m.row(2) = p3.n;

	return inverse(m)*-vec3(p1.d, p2.d, p3.d);
}