GLUT tessellation of generic data set

Hello all,

I’m trying to develope code able to triangulate a generic 3D data set.
I came from studying Delauney triangulation that can’t manage concave dataset.
I also tried other algorithms such as Manocha interpretaion of Seidel’s Algorithm, but is for 2D polygons. What i need is something to triangulate a generic polyhedron, without any information other than its vertices.

I’m now trying with GLUT tesselation, but it seems to need a pre subdivision of the polyhedron in contours.

I tried this:

  
int nVertices = 8;
static GLdouble polygon[8][3] =
{
{ 4, 1, 3 },
{ 4, 4, 3 },
{ 4, 4, 0 },
{ 4, 1, 0 },

{ 1, 1, 0 },
{ 1, 4, 0 },
{ 1, 4, 3 },
{ 1, 1, 3 },

};


....

tess = gluNewTess();
gluTessCallback(tess, GLU_BEGIN, glBegin);
gluTessCallback(tess, GLU_VERTEX, glVertex3dv);
gluTessCallback(tess, GLU_END, glEnd);

gluTessBeginPolygon(tess, (GLvoid *)0);
gluTessBeginContour(tess);
for(i=0; i<nVertices; i++)
gluTessVertex(tess, polygon[i], polygon[i]);
gluTessEndContour(tess);
gluTessEndPolygon(tess);
gluDeleteTess(tess);

That is the 8 vertices of simply cube. Well GLUT can’t triangulate it, if i don’t subdivide it in more vertices.

Any suggest?

Mm

GLUT will not help you, this problem is really complex (as you guessed). No more advice sorry…