Saturday, July 13, 2019

android - How do you triangulate an arbitrary polygon?


I need to triangulate a polygon for rendering in OpenGL ES on Android (no GLU triangulation available).


Is there an already known algorithm for polygon triangulation? The polygon can be convex or concave (with no holes).



Answer




There are several algorithms out there. One of the most commonly used algorithm is the ear clipping algorithm. Here's a page with some more detail about this triangulation algorithm.


No comments:

Post a Comment

Simple past, Present perfect Past perfect

Can you tell me which form of the following sentences is the correct one please? Imagine two friends discussing the gym... I was in a good s...