How to draw line model filled?

Hi,

for my model I have a list of vertices (x,y,z) and indeces (i,j) which define all the lines to be drawn (from vertex i to vertex j). Now the polygons created by drawing these (not ordered) lines are often pentagons. What is the easiest way to draw the model filled (triangles)?

Thanks
Dino

If you have only connectivity informations of two indices each, this is not as simple as you might think. E.g. if you take a line i->j and find an adjacent line j->k that doesn’t mean you have a triangle (i,j,k) because those two lines might span a triangle which lies inside the object instead of on its surface.
It’s almost as complicated as tesselating an unordered point cloud.
The real solution brings algorithms into play which are called Delauny triangulation or tetrahedralization (is that a word?).