Dark Bit Factory & Gravity
PROGRAMMING => General coding questions => Topic started by: relsoft on October 20, 2012
-
Thanks!
It doesn't have to be fast ;*)
-
Check Ear clipping (http://en.wikipedia.org/wiki/Polygon_triangulation#Ear_clipping_method) and Seidel's algorithm (http://www.cs.unc.edu/~dm/CODE/GEM/chapter.html).
The complexity varies depending on whether you need to support holes and/or intersecting edges.
If you're using OpenGL you might want to have a look at the glu tesselation implementation (http://www.flipcode.com/archives/Polygon_Tessellation_In_OpenGL.shtml), too.
-
Thanks buddy, reading up on ear-clipping. ;*)