Re: [Algorithms] more plane-poly clipping woes
Brought to you by:
vexxed72
From: Angel P. <ju...@bi...> - 2000-09-21 07:27:22
|
If I understood you correctly - the newly created split vertex does not lie within +/-EPSILON distance from the plane that generated it. There are tree reasonable ways to handle this: 1. Increase EPSILON. It MUST be big enough to handle such precision errors. 2. Increase your FP precision by using doubles. 3. Split polygons with very long edges to smaller polygons. I am quite certain that you get such inconsistencies only when splitting long edges. > Well, I'm now using "thick" BSP planes as suggested > to me by Angel Popov. This basically means treating > all your BSP planes as having some thickness; then > any vert which lies in that thickness is treated as > being already on the plane. When you clip a poly > against a plane, the verts which are "on" the plane > are not modified. This prevents you from clipping > segments where one point has a distance of 999 > and the other has a distance of -0.001 > > The problem is that the clipper is still not consistent. > That is, if I take a polygon and clip it against a > plane to produce two new polygons, and then test those > against the plane, they should tell me they're on the front > and back sides; instead they can occasionally report that > they intersect the plane, because a vertex produced by > clipping was not inside the thickness of the plane. > > The only solution I can think of for this is to have a > larger epsilon for plane-testing than for plane-clipping > (double seems to work), but that concerns me a bit (is > there a way that could lead to inconsistency?). > > > > -------------------------------------- > Charles Bloom www.cbloom.com > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |