亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

使用 Plotly 從點云生成表面網格

使用 Plotly 從點云生成表面網格

心有法竹 2023-04-11 15:22:45
我正在嘗試從點云生成表面我環顧四周,解決方案似乎是從云點生成三角形,然后生成最終網格。但是,我嘗試按照此處提出的程序進行操作,但失敗了并獲得了以下信息:可悲的是,我的數學背景不太好,當我開始從其他 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()

http://img2.sycdn.imooc.com/64350b060001015f06580551.jpg

如果你沒有頂點,另一種可能性是使用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)])



查看完整回答
反對 回復 2023-04-11
  • 1 回答
  • 0 關注
  • 181 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號