Reputation: 289
I have thousands of polygon on 3D space which contains more than 3 vertex. I want partition each polygon into a set of triangles. I have been looking all over the internet and I can not find any algorithm on 3D that does that. I have found many algorithms working on 2D like ear clipping
and Delaunay triangulation
. But I can not find any algorithm for 3D.
I saw many same questions on this site which answered with "use the Delaunay triangulation algorithm". But I have seen that this algorithm is for 2D: http://www.geom.uiuc.edu/~samuelp/del_project.html
Implement an algorithm for finding the constrained Delaunay triangulation of a given point set in two dimensions.
What 3D Triangulation algorithm can I use? I am using OpenGL with C++.
Upvotes: 6
Views: 7014
Reputation: 12582
You can use a delaunay triangulation but with tetrahedons. Basically use Bowyer Watson with circumspheres:http://blog.mmacklin.com/tag/meshing/.
Upvotes: 1
Reputation: 1621
You can use the GLUTesselator:
http://www.glprogramming.com/red/chapter11.html
Also note that a 3D polygon will have many faces which can be translated onto an axis aligned 2D plane, triangulated, and then the results translated back into the plane defined by the face.
Upvotes: 1