#### Archived

This topic is now archived and is closed to further replies.

# intersection points in 3d space

This topic is 6040 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

in the program i am writing, three planes are given. they are defined through one point on their surface and their normal (don''t know how this is called in english). these planes intersect in exactly one point. how can my program calculate this intersection point? does it have something to do with matrices?

##### Share on other sites
> does it have something to do with matrices?

Yes. Each plane defines a linear constraint on the point (x, y, z), e.g. plane 1 might be

ax + by + cz = p

Using the same format for the other two planes

dx + ey + fz = q
gx + hy + iz = r

This can be written as a matrix/vector equation:

(a b c) (x) (p)
(d e f) (y) = (q)
(g h i) (z) (r)

Or Mx = s

Where M is the matrix
(a b c)
(d e f)
(g h i)
s the constant vector
{p}
{q}
{r}
and x is the position vector of the point

And if M * x = s then x = (M^-1) * s

Where M^-1 is the inverse of M. Note that M is not a rotation matrix so the inverse is not the transpose: use general purpose matrix inversion to calculate it. M will always have an inverse if the planes meet at a single point, as the plane normals that make up the matrix must be linearly independent.