intersection points in 3d space
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?
> 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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement