One problem with ear-clipping is that it produces sub-optimal triangulations (in the the sense that it creates lots of very skinny triangles, which are visually and computationally unappealing). I suggested that he add a refinement step based on "flipping triangles" to improve the quality of the output triangle mesh. This is similar to the approach used in Delaunay triangulation algorithms, and in fact it turns out that a good flipping criteria is to test for the Delaunay condition. (Two adjacent triangles which form a convex quadrilateral are Delaunay if neither lies in the circumcircle of the other. Wikipedia has a nice visual explanation).
This code will get added to JTS in the next release. In the meantime, here's some cool pictures showing how it works.
A gnarly test polygon:
Before refinement

After refinement

A country that has been in the news recently:


1 comments:
Is this triangulation method available in the current JTS version? If so, which class is it? If not, is there another way to triangulate with support for holes?
Thanks!
Post a Comment