def plotFromVF(vertices, faces):
input_vec = mesh.Mesh(np.zeros(faces.shape[0], dtype=mesh.Mesh.dtype))
for i, f in enumerate(faces):
for j in range(3):
input_vec.vectors[i][j] = vertices[f[j],:]
figure = plt.figure()
axes = mplot3d.Axes3D(figure)
axes.add_collection3d(mplot3d.art3d.Poly3DCollection(input_vec.vectors))
scale = input_vec.points.flatten(-1)
axes.auto_scale_xyz(scale, scale, scale)
plt.show()
评论列表
文章目录