如何在python中创建3D高度图 [英] how to create a 3D height map in python
本文介绍了如何在python中创建3D高度图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个二维数组Z,用于存储该元素位置的高度。除了使用此处的方法外,我需要在其中创建数组X和具有与Z相同大小的Y,是否有更简单的方法来创建3D高度图?
I have a 2D array Z that stores the height at that element's position. Other than using the method here in which I need to create array X and Y with the same size as Z, are there any simpler methods to create a 3D height map?
3D表面高度图类似于第一个表面图此处。
The 3D surface height map is something like the first surface plot here.
推荐答案
即使我与其他人都认为网状网格并不困难,我仍然认为<$提供了一个解决方案。 c $ c> Mayavi 包(检查函数冲浪)
Even if I agree with the others that meshgrids are not difficult, still I think that a solution is provided by the Mayavi
package (check the function surf)
mlab
mlab.surf(Z)
mlab.show()
这篇关于如何在python中创建3D高度图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文