TESSELATE contourFinder output.

Hi ,
I would like to Tessellate the contour image acquired from OpenCv to use (the object) as convex object inside Physic Engine. I’ve been reading OpenGL have Tessellation method. Could be useful for this purpose? Anyone have idea how implement?

Best Regards

I found the tesselator in opengl (which we use for ofBeginShape()…) produces really acute angles that are bad for anything besides flat shading. I doubt they’d be good for a physics engine. They are way more like slivers (long, terribly skinny triangles) then a mesh.

much better is triangle, which does delauny triangulation and mesh generation. see here:


there is a c++ version :


I’ve posted example code here of doing the triangulation of particles here – just for doing triangle - triangle comparison:


you could use the same approach to get an array of good triangles. there are also some flags / options for making better meshes, but I didn’t play with triangle++. (have done this in triangle, though)…

good luck – I’m really curious about this and it would be nice to see the results !