我正在嘗試從點云生成表面我環顧四周,解決方案似乎是從云點生成三角形,然后生成最終網格。但是,我嘗試按照此處提出的程序進行操作,但失敗了并獲得了以下信息:可悲的是,我的數學背景不太好,當我開始從其他 awnsers 和 Plotly 文檔中的鑲嵌中閱讀 Jonathan Shewchuk 時,我并沒有真正理解。我使用的代碼是這樣的:#Assume X_Vir, Y_Vir and Z_Vir are list of points used to create the scatter plotpoints2D = np.vstack([X_Vir, Y_Vir]).Ttri = Delaunay(points2D) simplices = tri.simplicesfig = ff.create_trisurf(x=X_Vir, y=Y_Vir, z=Z_Vir, simplices=simplices)fig.show()有人有想法嗎?
1 回答

慕娘9325324
TA貢獻1783條經驗 獲得超4個贊
Mesh3d我通過使用plotly 函數提供點坐標以及關聯的頂點來解決我的問題:
fig = pot.Figure(data=[pot.Mesh3d(x=points_coord90[:,1], y=points_coord90[:,0], z=points_coord90[:,2],?
? ? ? ? ? ? ? ? ? ? ? ? i=points_vert[:,0], j=points_vert[:,1], k=points_vert[:,2],?
? ? ? ? ? ? ? ? ? ? ? ? intensity=bi_volt, cmin=0, cmax=2, reversescale=False, colorscale='RdYlBu', opacity=1)])
fig.show()
如果你沒有頂點,另一種可能性是使用plotly 的alphahull選項(而不是 Delaunay),但它沒有滿足我的需求:
fig?=?pot.Figure(data=[pot.Mesh3d(x=points_coord90[:,1],?y=points_coord90[:,0],?z=points_coord90[:,2],?alphahull=0.5,?opacity=0.5)])
添加回答
舉報
0/150
提交
取消