Triangulate a polygon whose contour touches itself with poly2tri?

我只是一个虾纸丫 提交于 2019-12-08 04:28:29

问题


Is it possible to triangulate a polygon which touches itself (like in the image above) with poly2tri?


回答1:


My solution: use Clipper to offset the polygon, triangulate it, and re-offset to obtain the final mesh.

Of course, this is a hack which does not always work since offsetting the polygon is a possibly destructive operation (if the are tiny ends on the polygon, they might not offset back to their original positions).



来源:https://stackoverflow.com/questions/34221075/triangulate-a-polygon-whose-contour-touches-itself-with-poly2tri

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!