I needed to decompose concave polygons into convex ones, and so I ended up using this: http://valis.cs.uiuc.edu/~sariel/resear ... fault.html
I refactored it a bit, but still, the implementation is *very* inefficient, and likely to throw OutOfMemory for large polygons (bird, nazsca_monkey, etc.). Do not even think of using it in realtime. I use it to prepare polygons for box2d, and it works for me. For that I tweaked it to create polygons of maximum 8 points.
Now, I hope someone will find this useful, and maybe even fix it to perform well. That would be great 🙂
I refactored it a bit, but still, the implementation is *very* inefficient, and likely to throw OutOfMemory for large polygons (bird, nazsca_monkey, etc.). Do not even think of using it in realtime. I use it to prepare polygons for box2d, and it works for me. For that I tweaked it to create polygons of maximum 8 points.
Now, I hope someone will find this useful, and maybe even fix it to perform well. That would be great 🙂