Python 使用Axes3D打印类似修剪的对象。Plot_trisurf()
我有一个Trimesh对象,我不知道如何绘制它。我的目标类似于mplot3d中的Axes3D.plot_trisurf()函数(见下文)。Trimesh对象甚至有一个包含面的属性,但我不知道从哪里获取网格点的坐标 谢谢你的建议Python 使用Axes3D打印类似修剪的对象。Plot_trisurf(),python,3d,mplot3d,trimesh,Python,3d,Mplot3d,Trimesh,我有一个Trimesh对象,我不知道如何绘制它。我的目标类似于mplot3d中的Axes3D.plot_trisurf()函数(见下文)。Trimesh对象甚至有一个包含面的属性,但我不知道从哪里获取网格点的坐标 谢谢你的建议 您可以这样做,其中mesh是Trimesh对象: import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D fig = plt.figure() ax = fig.add_subplot
您可以这样做,其中
mesh
是Trimesh对象:
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
ax = fig.add_subplot(111, projection='3d')
ax.plot_trisurf(mesh.vertices[:, 0], mesh.vertices[:,1], triangles=mesh.faces, Z=mesh.vertices[:,2])
plt.show()
你可能要玩的规模,方面,旋转等