在三角形顶点列表中查找连接的组件 [英] Find connected components in list of triangle vertices
本文介绍了在三角形顶点列表中查找连接的组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
考虑两个图,G1 =(V1,E1),G2 =(V2,E2)
Consider two graphs, G1 = (V1, E1), G2 = (V2, E2)
V1 = {1,2,3,4,5,6}
V2 = {7,8,9,10,11,12}
在空间中,这些顶点由三角形面(每个都有三个顶点)连接
In space, these vertices are connected by triangles faces (each with three vertices)
F1 = [[ 2, 1, 0], [ 0, 3, 2], [ 1, 4, 0], [ 0, 4, 3], [ 5, 1, 2], [ 3, 5, 2], [ 5, 4, 1], [ 4, 5, 3]]
F2 = [[ 8, 7, 6], [ 6, 9, 8], [ 7, 10, 6], [ 6, 10, 9], [11, 7, 8], [ 9, 11, 8], [11, 10, 7], [10, 11, 9]]
以上是我要查找的内容.如果给了我们整个面孔:
The above is what I am trying to find. If we are given the entire array of faces:
faces = [[ 2, 1, 0], [ 0, 3, 2], [ 1, 4, 0], [ 0, 4, 3], [ 5, 1, 2], [ 3, 5, 2],
[ 5, 4, 1], [ 4, 5, 3], [ 8, 7, 6], [ 6, 9, 8], [ 7, 10, 6], [ 6, 10, 9],
[11, 7, 8], [ 9, 11, 8], [11, 10, 7], [10, 11, 9]]
我们可以找到连接的组件,并分为F1
和F2
吗?
can we find the connected components, and separate into F1
and F2
?
此问题的一个版本已已解决 Mathematica,但我无法翻译.
A version of this problem has been solved in Mathematica, but I cannot translate.
查看全文