Fernando Perez wrote: > On Jan 12, 2008 12:48 PM, Jaap Spies <[EMAIL PROTECTED]> wrote: >> Fabio Tonti wrote: >>> Looks good, but seriosly: why don't we stick to the Mayavi/TVTK stuff from >>> Enthought??? >>> >> You should try! See the actual movies. Haven't seen that in mayavi. >> Try the examples and see how easy it is to visualize movement and other >> physics. Try for example the kinetics kit. > > There's an experimental implementation of vpython for tvtk, done by a > student of Prabhu. Currently the Traits overhead makes it > significantly slower than vpython, but it was just a quick hack, so it > may be possible to get all the vpython speed back. The api is > identical. >
Not so identical! I've been playing with enthought.tvtk.tools.visual. Most(?) or some of VPython is there, but I'm missing the scene class. In VPython you can interact with the scene on screen with mouse events. This is an important feature! For example you can move individual objects around, etcetera. This module is clearly not finished. From visual.py: """ A module that provides VPython like capabilities. For more details about VPython, refer the official website. VPython : http://www.vpython.org/index.html The API is based on VPython, but instead of using OpenGL and other C libraries, this is based completly on TVTK, and Traits and Numpy. All of the demos are also translated from VPython examples. The implementation is done using object oriented design, and each visualization capability is implemented as a seperate traits class. The attributes of each class could be independently edited. The API is kept as similar to VPython as much as possible. This module offers the following classes : Display actors sphere, cylinder, cone, box, arrow, curve, ring, helix, ellipsoid Functionality classes frame, vector, animator Utility functions iterator, remove_actor, show To see examples of classes and functions look at the `test_*` functions at the end of this file. Here is a quick example demonstrating how to use visual. Note: To provide threading support for WXWidgets which are essential for all GUI fucntionalities in visual, the visual module should be interactively used in ipython only when wthread mode is enabled. visual will not work properly in an interactive mode in vanilla python interpretor. :: $ ipython -wthread In [1]: from enthought.tvtk.tools import visual In [2]: visual.test_sphere() In [3]: s = visual.sphere() # Create a sphere actor In [4]: s.edit_traits() # Edit sphere actor's properties via GUI """ > Ask on the Enthought-dev list for details, I'm sure they'd love > someone to have a look and see if it's possible to optimize it a bit. > And Prabhu answered: >> Jaap Spies wrote: >>> > I was about to ask: what is the status of this vpython look alike? >> >> It is available, still works but is still slow. I'm not going to have >> any time to speed it up any time soon. Patches are welcome. :-) >> >> cheers, >> prabhu Jaap --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-devel@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/ -~----------~----~----~----~------~----~------~--~---