如何在python中创建3D高度图 [英] how to create a 3D height map in python

查看:33
本文介绍了如何在python中创建3D高度图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个二维数组 Z 存储该元素位置的高度.除了使用方法 here 之外,我需要在其中创建数组 X 和Y 与 Z 大小相同,有没有更简单的方法来创建 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.

推荐答案

即使我同意其他人的meshgrids并不难,但我仍然认为Mayavi包提供了一个解决方案(检查功能 surf)

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)

from mayavi import mlabmlab.surf(Z)mlab.show()

这篇关于如何在python中创建3D高度图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆