**1**

# Breaking down Concave Mesh into Convex Shapes

###
#1
Members - Reputation: **253**

Posted 16 August 2011 - 04:18 AM

I've read this post

http://mathoverflow....nvex-polyhedron

The theory seems to match what I was thinking, but I have absolutely no idea how to go about it. How do a get the convex sets from the cluster of planes to detect whether they are empty? The math behind it seems a bit confusing.

###
#2
Members - Reputation: **887**

Posted 16 August 2011 - 05:56 AM

I've read this post

http://mathoverflow....nvex-polyhedron

The theory seems to match what I was thinking, but I have absolutely no idea how to go about it. How do a get the convex sets from the cluster of planes to detect whether they are empty? The math behind it seems a bit confusing.

If you want an actually usable algorithm then doing that might be a bad idea anyway. The second answer in that link is primarily a proof for the existence of such a decomposition. Calculating it that way would be absurdly inefficient I guess (as in O(n!) inefficient).

To decide whether the intersection of a polytope and a half space is empty you'd have to track the vertices and "rays" of your polytopes and before intersecting it with a half space you'd have to check if any of the vertices or rays lie in that half space (otherwise the intersection is empty)...

A more reasonable approach I guess would be to do something like this:

- find a facet contained in a plane that intersects the mesh. if you can't find one the mesh is already convex and you can stop.
- slice the mesh along that plane (you can end up with more than 2 pieces after this)
- recursively repeat for every "submesh" you got from the slicing

###
#4
Members - Reputation: **130**

Posted 04 January 2012 - 04:29 AM

Other things are degenerate cases - which you can avoid by precomputing distances to points from plane beforehand, then checking the whole array and exchanging exact zeroes with minimal floating point value representable by your type. This way you can completely forget about degenerate cases resolution.

Hope this helps.