Say it again folks: Do not hibernate dual booted ubuntu and windows xp. Just eat the extra power usage.
We’ve had the technology for desktop 3D apps for years but can you think of a useful application where the controls are navigated in some sort of 3D geometry? No.
We already have networked 3D environments. Mostly use them for games. I don’t see this changing in a hurry. Maybe progress in remote gestural and voice control will speed things along. Or special glasses with network information overlayed, connected to GPS to let us literally run around in a virtual environment.
So, I’m simply going to download the Enthought Python Distribution. This is for my uni work, so the license is free. If it turns out Mayavi is the way to go, I can wrestle with building it.
I’ve had sucess in installing Mayavi, but can’t seem to get TVTK working.
I see three options
1. a second attempt at installing the ETS 2.7 mac binaries.
2. Install EPD and hope it works out of the box.
3. Learn to use VTK by itself already.
1. Failed, again with wx, this time not finding the right library
2. Trying this now
3. Maybe down the track.
This neat article explains why:
So, I want to render a density isosurface of my realtime sph code. Paul Bourke has some marching cubes code available, but it states that it is not optimised. To run the code here you need GLUT, which can be set up on OSX with these instructions.
An attractive alternative is to use VTK’s python bindings. I found
http://www.macresearch.org/installing_vtk_on_mac_os_x quite helpful. Also see
VTK itself looks a bit involved. Mayavi promises to be easier to use. But possibly not efficient enough..
VTK was a moderate amount of work to build. CMake.Cache.txt needed the following changes (rerun cmake after the changes to propagate them to the build scripts):
VTK_USE_RPATH=ON (This ensures the mayavi and tvtk installers find the libraries)
Actually all the documentation says to have carbon on and cocoa off, but I want to try some of the tutorials drew mccormack has written for using vtk with cocoa.
The Mayavi install didn’t like this, so I am trying the carbon build (rebuilding everything…). I will need to do a couple of builds in the event I decide to try my hand at cocoa, but I doubt it.
The last crucial step in setting up vtk is to go into Wrapping/Python and run setup.py install to get in in the right spot.
rom the mayvi svn wiki:
make install. By default, everything will go into /usr/local even the Python libraries. They won’t be found there, so I then go to the build/Wrapping/Python/ directory and do a standard python setup.py install to put the Python package in the right place.
Mayavi was too hard to install alone, so I am now trying to install the whole enthought toolkit. I get a sandbox violation every second or third attempt. Turns out this is because Pyrex needs to save a lexicon the first time it is run, and it can’t do this in the easy_install sandbox. (thanks to Robert Kern at https://svn.enthought.com/enthought/ticket/1449). Giving up. Can’t get Kiva to recognise the wx library.
Back to using VTK directly, which is probably the fastest solution at any rate, and doesn’t trap me under a mountain of dependencies.
So it’s proving hard to find a simple example of how to take a numpy array, feed it to vtk and get a 3d isosurface plot. I don’t know if this is because most people use the c++ interface directly, or work from file data, or what. This page seems helpful http://www.imaging.robarts.ca/~dgobbi/vtk/vtkpython.html
Time to pick an approach and implement. A full day’s work compiling stuff and not much concrete to show for it. Well, a working vtk is concrete, except that I don’t know how to use it yet. And it’s not even clear that marching cubes is the best implementation.