开发者

Divide self intersecting polygon (C Code)

开发者 https://www.devze.com 2023-01-24 01:16 出处:网络
I want to divide a self-intersecting polygon into simple polygons. I have the edges and the intersection points saved in a data structure (a connected list).

I want to divide a self-intersecting polygon into simple polygons. I have the edges and the intersection points saved in a data structure (a connected list).

So here is an example. 开发者_如何学运维I have a connected list with the x,y coordinates of the edges and the intersection points of the polygon. According to the polygon in this picture it would be :: (1) -> (2) -> (3) ... -> (7). What I'm trying to do is to get the edges of the simple polygons (triangles here). In this case :: 1,2,7 / 3,4,5 / 5,6,7.


I would think that Bentley-Ottman would be your best bet. There's a nice interactive visualization here. Another nice description here.

0

精彩评论

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