2D polygon to 3D polygon triangles generation

Hi all,

I have a program where I pick a 2d polygon and his height from a spatial database. I choose a reference point in WGS84 from the points returned, and then I compute the relative points which will be the 3D vertices. Until here everything is ok, however I need to output the mesh in OBJ format. To do that, I need to specify the mesh faces. How can I compute the triangles in order to get it correctly rendered ?

What keywors should I search for this topic ?

delaunay triangulation ?
http://www.cs.cmu.edu/~quake/triangle.html

Otherwise if you need full 3D surface reconstruction from points, you may search for “ball pivoting” algorithms.
Meshlab has one :
http://meshlab.sourceforge.net/

Hi,

Thanks for helping.

I can triangulate the 2d polygon using Triangle and then duplicate each triangle changing the z value, that will give me the roof and the floor of the polygon, but the faces that connect roof with floor how should i generate them ?

Any Ideas ?

Thanks in advance

Ok will look at meshlab, currently I’m using it and it works very good for mesh simplification.

Thanks.

Anyway I don’t fully understand why you need to dynamically reconstruct the triangles when picking your 2D polygon.

You don’t have any connectivity information between vertices ?

If your 3d mesh is simply a flat 2D polygon which has been vertically extruded, it is trivial to get the full triangle mesh.

What he said.