开发者

How do I cut triangles out of a concave Delaunay triangulation?

开发者 https://www.devze.com 2022-12-13 05:19 出处:网络
I\'m using Delaunay to triangulate a concave polygon, but it fills in the concavities. How do I automatically remove the trian开发者_StackOverflowgles that are outside the polygon boundaries?Self-answ

I'm using Delaunay to triangulate a concave polygon, but it fills in the concavities. How do I automatically remove the trian开发者_StackOverflowgles that are outside the polygon boundaries?


Self-answer: in some cases, this is impossible. I needed to use a constrained Delaunay algorithm: http://www.cs.cmu.edu/~quake/triangle.delaunay.html


You shouldn't, you should find a Delauney routine that handles boundaries correctly.

Alternately you could, assuming you know the edges, go through every triangle and delete those that cross an edge. Search for segment-segment interestion tests for code to do this.

0

精彩评论

暂无评论...
验证码 换一张
取 消