From: Bruce S. <Bru...@nc...> - 2009-12-22 16:26:45
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=UTF-8" http-equiv="Content-Type"> </head> <body bgcolor="#ffffff" text="#000000"> I apologize for not responding to your earlier question about vectors. The Visual "vector" is designed to mimic the properties of 3D vectors used in math and science (add, subtract, magnitude, dot and cross product, etc.). The numpy module provides a very large number of structures and operations on arrays, which makes it possible to do scientific processing in Python where using lists would be unbearably slow. One uses Visual vectors for describing positions of Visual objects, and general geometric calculations related to 3D displays. The VPython example programs gas.py and stars.py are examples of the use of numpy arrays for doing numerical integrations of motion for many objects in single array statements.<br> <br> I've never used ipython and don't know what the problem is (I've only used IDLE or the more recent VIDLE). I would guess that the problem is with Visual, not with ipython, but I don't know. If you're willing to delve into Visual to see what the problem is (and maybe fix it), great!<br> <br> Bruce Sherwood<br> <br> Venkat Ramanan wrote: <blockquote cite="mid:c29...@ma..." type="cite"> <pre wrap="">Hi all, Thanks for the visual link. I've previously used VTK using Octaviz, which is an Octave interface to VTK. Octaviz is very easy to use, makes good plots. But animations using it is slow, many primitives like 3D-arrows are limited in functionality and sadly Octaviz is not being developed anymore, as far as I know. It is not even present in the 9.10 Ubuntu repositories. In general, VTK has a lot of options, but needlessly complicated for me. On the other hand, vpython is simple to setup and fast. It basically took only a few minutes to get the basics of it. BTW, regarding issue 1b of my original post, I was stupidly calling display every time the script was run. If I don't call it, it reuses the last display and it is fine. Can someone please comment on the remaining issues? 1. vector() versus numpy array differences? Basically what is better to use and why? 2. If only I can get ipython to play nice with vpython, I'm basically all set. Is it something on the ipython side or in vpython? I can hack something together, if there are some pointers. Thanks, Venkat. PS: I meant to send the reply to the list, but it was mistakenly sent personally to Guy Kloss. On Sat, Dec 19, 2009 at 2:52 PM, Guy K. Kloss <a class="moz-txt-link-rfc2396E" href="mailto:g....@ma..."><g....@ma...></a> wrote: </pre> <blockquote type="cite"> <pre wrap="">On Sun, 20 Dec 2009 04:13:58 James Mueller wrote: </pre> <blockquote type="cite"> <pre wrap="">Again, I haven't tried it, so I can't offer any review of it. </pre> </blockquote> <pre wrap="">I can somewhat help out there ... I've tested that Visual module. It's somewhat more geared towards the Visual 3.x API, it's *quite* a bit slower than visual, and it's not as feature rich. Also there are some draw backs due to bugs/limitations in the traits implementation limiting the range of usable sizes, etc. Some code also has to be (slightly) adapted to fit that visual API of Mayavi. Performance can be somewhat boosted significantly by switching to the Qt4 backend over the default wx windowing backend. Still, performance is not nearly as good as with Visual Python. I did a presentation with a paper at the last Kiwi PyCon touching this topic. The slides are here: <a class="moz-txt-link-freetext" href="http://www.slideshare.net/XEmacs/python-data-plotting-and-visualisation">http://www.slideshare.net/XEmacs/python-data-plotting-and-visualisation</a>- extravaganza A paper of that is soon to be published under the Python Papers Monograph Series for that: <a class="moz-txt-link-freetext" href="http://pythonpapers.org">http://pythonpapers.org</a> Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Massey University, Albany (North Shore City, Auckland) 473 State Highway 17, Gate 1, Mailroom, Quad B Building voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 <a class="moz-txt-link-abbreviated" href="mailto:G....@ma...">G....@ma...</a> <a class="moz-txt-link-freetext" href="http://www.massey.ac.nz/~gkloss">http://www.massey.ac.nz/~gkloss</a> ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/verizon-dev2dev">http://p.sf.net/sfu/verizon-dev2dev</a> _______________________________________________ Visualpython-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Vis...@li...">Vis...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/visualpython-users">https://lists.sourceforge.net/lists/listinfo/visualpython-users</a> </pre> </blockquote> <pre wrap=""><!----> ------------------------------------------------------------------------------ This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers <a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/verizon-dev2dev">http://p.sf.net/sfu/verizon-dev2dev</a> _______________________________________________ Visualpython-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Vis...@li...">Vis...@li...</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/visualpython-users">https://lists.sourceforge.net/lists/listinfo/visualpython-users</a> </pre> </blockquote> </body> </html> |