Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delaunay triangulating the 2d polygon with holes

I want to triangulate the complex (but not self-intersecting) polygon with holes, so that resulting triangles all lay inside the polygon, cover that polygon completely, and obey the Delaunay triangle rules.

Obviously, I could just build the Delaunay triangulation for all points, but I fear that some edges of the polygon will not be included into resulting triangulation.

So, is such triangulation possible? And if yes, how can I do it?

Just in case - I need it to construct the approximation of polygon medial axis (I hope it can be done via connecting all circumference points of resulting triangles).

like image 268
Rogach Avatar asked Apr 13 '11 08:04

Rogach


People also ask

What is Delaunay triangulation method?

The Delaunay triangulation is a triangulation which is equivalent to the nerve of the cells in a Voronoi diagram, i.e., that triangulation of the convex hull of the points in the diagram in which every circumcircle of a triangle is an empty circle (Okabe et al. 1992, p. 94).

What is polygon triangulation used for?

Computing the triangulation of a polygon is a fundamental algorithm in computational geometry. In computer graphics, polygon triangulation algorithms are widely used for tessellating curved geometries, as are described by splines [Kumar and Manocha 1994].

How many triangles are in a triangulation?

Every triangulation of an n-gon has exactly n − 2 triangles. 3. Polygon in picture has n = 13, and 11 triangles.


1 Answers

It sounds like you want constrained Delaunay triangulation. The "holes" can be implemented by constraining input edges to remain unbroken in the triangulation.

See the Triangle and poly2tri projects for implementations.

like image 140
Kipton Barros Avatar answered Sep 20 '22 15:09

Kipton Barros