How do you determine the intersection of four or more planes?
Is there a simple trick to this?
I want to be able to create an primitive object (sphere, cube, piramid, …) only using the plane equotations of the faces of those objects… (like QBSP does)
I thought I had to determine
intersections of two planes = line
intersections of those lines = vertexes
use the vertexes to create the polygon-data
I tried this by hand (i took me about an hour or so) on 6 planes ( a cube). So it does work… on a cube, but not on a cylinder, because you have to know wich planes cross wich
Actually, you are on the right track, you just need to intersect two planes to get a line, then intersect that line with the other planes to find potential points of the primitive. Now if the primitive is simple and convex, and all plane normals face outward, you can check to see if each point is in front, on, or behind a plane. A point will be a part of the primitive only if it is on or behind (inclusive) all other planes of the convex hull. So the instant one of the potential points is found to be in front of a plane, it can be thrown away immediately. Solving an augmented matrix, you can actually intersect three planes at a time to get each potential point rather than intersecting two planes and then intersecting that line with the other planes. And yes, it involves determinates and cofactors.
[This message has been edited by DFrey (edited 07-11-2000).]