Polygonal Triangulation C #

I need to calculate the polygon triangles. A polygon may contain holes. And Req is an effective way. So I think I need limited Delaunay triangulation.

I have to do this in C #, I just need to calculate, not draw or something like that.

poly2tri seems good, but idk its not working for me: S

In any case, I need help. How can I calculate these triangles? (If your best suggestion is poly2tri , I can explain my problem on it)

+4
source share
2 answers

Delaunay was not designed for this, use Ear Cuts instead.

+2
source

I believe my simple solution on github is: gist (but it is quite old and probably not optimal).

+1
source

Source: https://habr.com/ru/post/1438455/


All Articles