【发布时间】:2018-09-25 14:13:21
【问题描述】:
我正在尝试实现一种算法来从半边结构中删除边和顶点。请参阅附图中的插图:
我知道 Openmesh 和 CGAL 等库可以帮助我实现这一目标,但我打算自己实现它。
我原来的想法是这样的:
1. Find out the half edges associated with that edge
2. Find out all the faces associated with each half edge
3. Find out all the edges and vertices corresponds to each face
4. Not sure how to merge them together ie how to merge edge 1 edge 2, vertex 4 and 2 and edge 5 and 4 in the attached graph.
5. Delete all the faces.
6. Delete all the half edges
如果我在正确的轨道上,有人可以给一些建议吗?
我也在网上做了一些研究,在网上找到了一篇似乎很有帮助的文章。
这是链接:http://kaba.hilvi.org/homepage/blog/halfedge/halfedge.htm
在删除边缘部分下,它列出了以下步骤:
1.Remove all of the polygons connected to the edge.
2.Link the half-edges of the edge off from the mesh.
3.Deallocate the edge and its half-edges.
第一个和最后一个对我来说很有意义。但是,我不确定作者将边缘的半边与网格连接起来是什么意思?有人可以向我解释一下吗?谢谢!
【问题讨论】:
-
您显示的操作不是边缘删除。那将留下一个4面的脸。您要问的是“边缘崩溃”。这是一个非常常见的操作。如果你做一些搜索,你应该找到算法和实现的讨论。这是我在快速搜索中找到的第一个:utdallas.edu/~praba/6v81/3dModeling.pdf
-
@Gene 感谢您的提醒。我将浏览那些幻灯片。您是否还可以建议一些用于删除顶点的读数。棘手的部分是不应该产生开放边界,如第二张图片所示。非常感谢!
-
你的第二张照片比第一张更令人困惑。您删除四个边和一个顶点并创建一个新边。
-
@YvesDaoust 第二个是删除顶点功能。我删除了中心的顶点,因此必须删除四边。我说的是三角形网格,这就是我需要创建新边缘的原因。否则结构无效。
-
@CCC:你不应该让我们猜。
标签: algorithm data-structures graphics computational-geometry