Mayavi无法正确渲染实体表面

问题描述 投票:4回答:1

我刚刚在计算机上重新安装了Fedora 28,并决定尝试在Python 3中尝试Mayavi,而以前该版本只能在Python 2中运行。我从pippip3 install mayavi --user一起安装了Mayavi,没有任何问题。但是,当我运行this script绘制球谐函数时,我得到的表面看上去像是间隙,而我以前(对于Python 2)得到的是实心表面。我没有为此设置系统,但是如果我的意思不清楚,我可以尝试重现旧图。

任何想法如何使该表面再次坚固?

Current Mayavi window with partially transparent (or gaps in?) surface

如果相关,这里有一些包装信息:

$ pip3 show vtk mayavi
Name: vtk
Version: 8.1.1
Summary: VTK is an open-source toolkit for 3D computer graphics, image processing, and visualization
Home-page: https://vtk.org/
Author: VTK Community
Author-email: [email protected]
License: BSD
Location: ~/.local/lib/python3.6/site-packages
Requires: 
---
Name: mayavi
Version: 4.6.2
Summary: 3D scientific data visualization library and application
Home-page: http://docs.enthought.com/mayavi/mayavi/
Author: Prabhu Ramachandran, et. al.
Author-email: [email protected]
License: BSD
Location: ~/.local/lib/python3.6/site-packages
Requires: apptools, envisage, numpy, pyface, pygments, traits, traitsui, vtk
python python-3.x vtk mayavi
1个回答
3
投票

这可能是硬件问题。在我的笔记本电脑上(在Debian GNU / Linux下),我有2张图形卡:

  • 英特尔图形卡
  • 具有擎天柱技术的Nvidia图形卡

为了利用Nvidia的功能,并且由于使用了optimus技术,我必须安装bumblebeehttps://bumblebee-project.org/)并使用optirun命令启动3D软件:

optirun python3 my_mayavi_script.py

而不是:

python3 my_mayavi_script.py

如果我尝试在不使用http://docs.enthought.com/mayavi/mayavi/mlab.html#simple-scripting-with-mlab的情况下在此处遵循optirun的mayavi教程,则>

enter image description here

如果使用optirun,我会得到

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.