Triangulation algorithms that conform to a set of non-intersecting input segments typically proceed in an incremental fashion, by inserting points first, and then segments. Inserting a segment amounts to: (1) deleting all the triangles it intersects; (2) filling the so generated hole with two polygons that have the wanted segment as shared edge; (3) triangulate each polygon separately. In this paper we prove that these polygons are such that all their convex vertices but two can be used to form triangles in an earcut fashion, without the need to check whether other polygon points are located within each ear. The fact that any simple polygon contains at least three convex vertices guarantees the existence of a valid ear to cut, ensuring convergence. Not only this translates to an optimal deterministic linear time triangulation algorithm, but such algorithm is also trivial to implement. We formally prove the correctness of our approach, also validating it in practical applications and comparing it with prior art.
翻译:符合一组非交叉输入部分的三角算法通常以递增方式进行, 先插入点, 然后再插入段。 插入一个区段等于:(1) 删除它交叉的所有三角形; (2) 以两个多边形填充这样产生的洞口, 以两个多边形填充想要的区段作为共享边缘; (3) 将每个多边形分开三角。 在本文中, 我们证明这些多边形能够使它们所有的 convex 脊椎, 但两个可以用来以耳切方式形成三角形, 而不必检查其他多边形点是否位于每个耳内。 任何简单的多边形都至少包含三个convex 脊椎, 保证有一个有效的耳朵可以切开, 确保汇合。 这不仅能转化为最佳的确定性线性线性线性三角算法, 而且这种算法也是微不足道的。 我们正式证明了我们的方法的正确性, 同时在实际应用中验证它, 并与以前的艺术比较它 。