1、代码及相关资料下载地址:https://download.csdn.net/download/higher80/10502633
2、参考资料地址(如果下列网址打不开,可以看上面“1”中的文件,里面有下载的网页文件)
(1)使用python绘制三维圆柱网格模型图——voxels函数的使用:https://www.jianshu.com/p/03ed963eb51a
(2)3D voxel / volumetric plot with rgb colors:https://matplotlib.org/gallery/mplot3d/voxels_rgb.html
(3)3D voxel / volumetric plot:https://matplotlib.org/gallery/mplot3d/voxels.html#d-voxel-volumetric-plot
3、关键是要用到 matplotlib 里面的函数 voxels
4、matplotlib版本好像是2.2.1及以上版本;反正要求较高版本
5、程序运行后的显示效果:
图1
扫描二维码关注公众号,回复:
1886340 查看本文章
图2