Original Post
Not sure what key words to use for searching this on Google, so I have to just describe it.
I have an array of planes (described by 3 points each which are always going to be points that lie on the intersections of 3 planes that form the object) that describe a convex polyhedron.
My goal is to make a triangle mesh to graphically display the polyhedron described by the planes.
Here are some things I already know how to do (don’t worry, what I am asking is not as complex as it sounds, as I can do 90% (I estimate) already).
#1: I already have robust routines for intersecting 3 planes to find a point, if one exists.
#2: I already have a polygon class which will end up describing the faces of the polyhedron, and this class has ear-clipping already functional so that I can break it down into a triangle mesh. All I need is to get the faces of the the polyhedron into this polygon format, and this is my only question.
#3: The points are counter-clockwise and I already have a plane class that accepts 3 points and transforms them into a more suitable plane representation (distance + normal) which I use in all the rest of my plane math.
#4: I mentioned intersecting 3 planes for a point, but I can also intersect 2 planes for a line.
So I have all the tools I need to handle this process. All I need is a concept on a robust way to break all these planes down into polygons that represent each face of the original object.
For all the ideas I have been make on my own, I keep finding pathological cases that break my idea. I need something robust, tried, and true, because this is a very important feature of my tool chain for my engine.
I also would not mind some tips on things to avoid in the name of robustness. I plan on working with doubles (or possibly 2,048-bit fixed-point integer form) for most of the math and have proper (if somewhat expensive) epsilon checks in place, etc., but I want to be sure I am taking every precaution possible because I have seen professional toolchains that have tried to load and convert the very same files I am now trying to do and fail to properly realize that some very narrow slab-type polynomials are in fact valid and other cases where it converts the level but then you see slab-type triangles missing and in some cases you can fall through the level there.
So I am really hoping not to fall into those kinds of traps, so robustness is extremely important.
Thank you,
L. Spiro
I have an array of planes (described by 3 points each which are always going to be points that lie on the intersections of 3 planes that form the object) that describe a convex polyhedron.
My goal is to make a triangle mesh to graphically display the polyhedron described by the planes.
Here are some things I already know how to do (don’t worry, what I am asking is not as complex as it sounds, as I can do 90% (I estimate) already).
#1: I already have robust routines for intersecting 3 planes to find a point, if one exists.
#2: I already have a polygon class which will end up describing the faces of the polyhedron, and this class has ear-clipping already functional so that I can break it down into a triangle mesh. All I need is to get the faces of the the polyhedron into this polygon format, and this is my only question.
#3: The points are counter-clockwise and I already have a plane class that accepts 3 points and transforms them into a more suitable plane representation (distance + normal) which I use in all the rest of my plane math.
#4: I mentioned intersecting 3 planes for a point, but I can also intersect 2 planes for a line.
So I have all the tools I need to handle this process. All I need is a concept on a robust way to break all these planes down into polygons that represent each face of the original object.
For all the ideas I have been make on my own, I keep finding pathological cases that break my idea. I need something robust, tried, and true, because this is a very important feature of my tool chain for my engine.
I also would not mind some tips on things to avoid in the name of robustness. I plan on working with doubles (or possibly 2,048-bit fixed-point integer form) for most of the math and have proper (if somewhat expensive) epsilon checks in place, etc., but I want to be sure I am taking every precaution possible because I have seen professional toolchains that have tried to load and convert the very same files I am now trying to do and fail to properly realize that some very narrow slab-type polynomials are in fact valid and other cases where it converts the level but then you see slab-type triangles missing and in some cases you can fall through the level there.
So I am really hoping not to fall into those kinds of traps, so robustness is extremely important.
Thank you,
L. Spiro