Numerical Computing, Additional software

Additional packages for 3D

If your project requires loading 3D models and/or displaying 3D models, you may want to use OpenGLContext which provides a high-level scene graph API. (Unfortunately, the python wrapping of vtk API that comes standard with Enthought's distribution has problems with some crucial bits of functionality you may need).

For installation, please follow instructions at OpenGLContext installation page.

Some of the low-level dependencies of OpenGLContext are already installed as a part of Enthought's distribution, but not all.

In addition to OpenGLContext itself, you need to install PyDispatcher, SimpleParse and PyVRML97. Note that the instructions do not mention PyVRML97, but you do need to install it separately, at least on Windows. If there are several distributions available, choose the one for Python 2.5.

Do NOT install PyOpenGL, ctypes, numpy -- these are already installed. If you run into problems, let me know right away.

Also note that it is generally inconvenient to use ipython/pylab interactive shell with OpenGLContext, because there is no way to terminate the main loop of your python script if it uses GLUT to display 3D. I recommend using IDLE instead.

Additional packages for images

Using Python Imaging Library is probably all you need. It is a part of Enthought's distribution, so you do not need to install it.

Sample code

simplemesh.py: Create a simple mesh with colors assigned to vertices in the code, display it, and modify positions of vertices every 0.3 seconds.

vrmload.py: Load a VRML model, The standard radiosity test model (Cornell box).

image_example.py loads and displays an image. A sample image file.