划分自相交多边形(C 代码)

发布于 2024-09-30 19:07:08 字数 286 浏览 0 评论 0原文

我想将自相交多边形划分为简单多边形。我将边和交点保存在数据结构(连接列表)中。

这是一个例子。我有一个连接列表,其中包含多边形的边缘和交点的 x,y 坐标。根据这张图片中的多边形,它将是:: (1) -> ; (2)-> (3)...-> (7)。我想做的是获取简单多边形(这里是三角形)的边缘。在本例中::: 1,2,7 / 3,4,5 / 5,6,7。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

り繁华旳梦境 2024-10-07 19:07:08

我认为 Bentley-Ottman 将是您最好的选择。 这里有一个很好的交互式可视化。 此处还有一个很好的描述。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文