MayaVi


MayaVi is a scientific data visualizer written in Python, which uses VTK and provides a GUI via Tkinter. MayaVi was developed by Prabhu Ramachandran, is free and distributed under the BSD License. It is cross-platform and runs on any platform where both Python and VTK are available. MayaVi is pronounced as a single name, "Ma-ya-vee", meaning "magical" in Sanskrit. The code of MayaVi has nothing in common with that of Autodesk Maya or the Vi text editor.
The latest version of MayaVi, called Mayavi2, is a component of the Enthought suite of scientific Python programs. It differs from the original MayaVi by its strong focus on making not only an interactive program, but also a reusable component for 3D plotting in Python. Although it exposes a slightly different interface and API than the original MayaVi, it now has more features.

Major features

Spherical harmonics


from numpy import linspace, meshgrid, array, sin, cos, pi, abs
from scipy.special import sph_harm
from mayavi import mlab
theta_1d = linspace
phi_1d = linspace
theta_2d, phi_2d = meshgrid
xyz_2d = array * sin,
sin * cos,
cos
l=3
m=0
Y_lm = sph_harm
r = abs*xyz_2d

mlab.figure
mlab.mesh
mlab.view
mlab.savefig
mlab.show