我正在尝试从点云生成曲面。我环顾四周,解决方案似乎是从云点生成三角形,然后生成最终网格。然而,我试图按照提议的程序here但是我失败了,得到了这个:
遗憾的是,我的数学背景不太好,当我开始从其他awnsers和Plotly文档中阅读Jonathan Shewchuk和tessellation时,我并没有真正理解
我使用的代码如下:
#Assume X_Vir, Y_Vir and Z_Vir are list of points used to create the scatter plot
points2D = np.vstack([X_Vir, Y_Vir]).T
tri = Delaunay(points2D)
simplices = tri.simplices
fig = ff.create_trisurf(x=X_Vir, y=Y_Vir, z=Z_Vir, simplices=simplices)
fig.show()
有人有主意吗
多谢各位
我通过使用plotly的
Mesh3d
函数提供点坐标以及相关顶点,解决了我的问题:如果没有顶点,另一种可能是使用plotly的alphahull选项(而不是Delaunay),但它没有满足我的需要:
相关问题 更多 >
编程相关推荐