Monday, March 9, 2009

Sage notebook, Mayavi2 and 3D interaction on the web

Thanks to a cool open source x3d viewer along with its browser plugin -- freewrl, I can now use mayavi2 in a sage notebook and also get 3d interactivity! To see this in action see here. You should see something that looks like this:

The view on the bottom supports full 3d interactivity, which is really quite cool. This works seamlessly with the debian package on the freewrl site. I just installed the packge on my Ubuntu 8.04 machine and it works really nicely. The only trouble is that for more complex visualizations, the x3d file exported can be quite large but this can be partially alleviated by perhaps using mod_deflate and similar options on the server.

Now the x3d embedding above is a hack currently since I manually embedded the necessary HTML tag into the sage worksheet but as can be gleaned from this thread, this should be trivial to add to Sage proper. This opens up an exciting new possibility for mayavi2 on the web.

2 comments:

Balkrishnanitt said...
This comment has been removed by the author.
Balkrishnanitt said...
This comment has been removed by the author.