Scientific Libraries in Python

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Mon Nov 12 02:21:57 EST 2001


>>>>> "FP" == Fernando Pérez <fperez528 at yahoo.com> writes:

[snip]
    FP> 3) A true visualization *framework*, which has both high-level
    FP> plotting routines and access to basic
    FP> primitives. Mathematica's plotting system, while not the most
    FP> convenient to use, is a good example of this idea. You can
    FP> just 'plot' stuff, but you also have low-level access to the
    FP> graphing primitives to program more complex stuff yourself.

[snip]

    FP> 3: there's a lot out there, but nothing convinces me
    FP> yet. VPython is great for 3d work but still in its infancy,
    FP> gnuplot and grace have python access but don't provide
    FP> low-level access, scigraphica doesnt' seem ready yet, ...

VPython/OpenGL are great for rendering simple primitives on screen and
doing animations and stuff.  Yes, you can definitely build complex
visualizations with them but its not so easy to do useful
visualizations quickly.  VPython does abstract out a lot of things
very nicely but if you ask me, its still too low level.

High level 3D visualization is a different ball game.  If you are
serious about it you *have* to look at the Visualization ToolKit
(VTK).

	http://public.kitware.com/VTK/

VTK is an open-source, cross platform, very high level visualization
library thats fairly mature but under active development.  It is
written in C++ and has bindings for Tcl, Python and Java.  The Python
bindings are really good.  VTK internally uses OpenGL to do the actual
rendering but presents a very high level pipeline based design to the
end user.  This makes it fairly easy to use.  That said, VTK is
*HUGE*, it has over 650 classes that enable one to do 3D graphics,
data visualization, to do image processing etc.  Visit the web page
for more details.  In short, its really amazing.  Best of all its OSS.
The biggest problem with VTK is its complexity.  Its not something you
can master in a few days even.  Documentation is available in the form
of a couple of books and you really have to read them.

>>> s = ShamelessPlug()
>>> s.start()

VTK is library and some folks have trouble using it because it does
take some effort to get the hang of it.  There is one tool/application
out there that helps such folks out by attempting to make data
visualization very easy.  Its written in 100% pure Python and uses VTK
and Tkinter.  Its available here:

     http://mayavi.sf.net

To see specific examples in action look here:
http://mayavi.sf.net/screenshots/

The latest CVS version adds the capability for one to use it from the
Python interpreter and script it.  A new release is due shortly so
don't download the old release.  I'll surely announce the next release
when its done.  Its certainly not perfect and the Python interface
does need lots of cleaning up etc. but this feature was added recently
so still needs work.  I'm also investigating the possibility of adding
a useful module that allows for matlab like visualizations from within
SciPy using MayaVi.

>>> s.stop()


Cheers,
prabhu




More information about the Python-list mailing list