user1708062
user1708062

Reputation: 75

Polygon Triangulation c#

I need to calculate triangles of a polygon. Polygon can contain holes. And Req an efficient way. So I think I need Constrained Delaunay Triangulation.

I must do that in c#, only need calculation not drawing or something.

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

Anyway I need help. How can I calculate that triangles? (If your best offer is poly2tri, i can explain my problem on it)

Upvotes: 6

Views: 10862

Answers (2)

abenci
abenci

Reputation: 8651

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

Upvotes: 3

Ivan Kochurkin
Ivan Kochurkin

Reputation: 4501

I suppose my simple solution on github:gist (but it's rather old and probably not optimal).

Upvotes: 2

Related Questions