Finding 8 vertices of a frustum from the 6 planes defining it
I'm trying to find the 8 vertices of an arbitrary frustum (ie. not necessarily a view frustum from a projection matrix) using just the 6 planes defining it. This is basically so that I can display the frustum in 3D space for debugging etc.
My current plan is to do a 3-plane intersection point calculation for each corner (which I'm currently trying to read up on), however I was wondering if there was a simpler, more direct route to finding the vertices.
Thanks for any info,
ob1
For an arbitrary frustum, I'm afraid you're stuck with your current approach, unless you know anything "special" about the planes or frustum shape.
Right, it's a 3x3 matrix inversion (3 plane equations) for each vertex in any general case.
Else check of you have any additional info to exploit in your context. Getting the vertices of a standard VF is straightforward when defined à la OpenGL (xmin, ...., zfar) and a rotation/translation matrix. Maybe you can also have obvious coordinates in other referentials (an oriented box for instance).
Else check of you have any additional info to exploit in your context. Getting the vertices of a standard VF is straightforward when defined à la OpenGL (xmin, ...., zfar) and a rotation/translation matrix. Maybe you can also have obvious coordinates in other referentials (an oriented box for instance).
I also use the 3 planes method. There are probably other ways to do it, but I don't know that it would be an important thing to optimize.
Yeah, I think I'll stick with the 3-plane method for now then, since at the moment I'm just using it for debugging.
Incidently, if anyone is interested I've found a nice formula for finding the intersection point of 3 planes:
http://astronomy.swin.edu.au/~pbourke/geometry/3planes/
This is less complex than some of the other methods I've come across via google, and seems to work perfectly as far as I've tested it.
ob1
Incidently, if anyone is interested I've found a nice formula for finding the intersection point of 3 planes:
http://astronomy.swin.edu.au/~pbourke/geometry/3planes/
This is less complex than some of the other methods I've come across via google, and seems to work perfectly as far as I've tested it.
ob1
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement