You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(15) |
Oct
(32) |
Nov
(35) |
Dec
(48) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(46) |
Feb
(22) |
Mar
(65) |
Apr
(49) |
May
(22) |
Jun
(29) |
Jul
(51) |
Aug
(34) |
Sep
(32) |
Oct
(46) |
Nov
(30) |
Dec
(32) |
2002 |
Jan
(48) |
Feb
(4) |
Mar
(20) |
Apr
(28) |
May
(13) |
Jun
(34) |
Jul
(51) |
Aug
(15) |
Sep
(15) |
Oct
(35) |
Nov
(15) |
Dec
(20) |
2003 |
Jan
(31) |
Feb
(111) |
Mar
(41) |
Apr
(28) |
May
(36) |
Jun
(29) |
Jul
(27) |
Aug
(29) |
Sep
(47) |
Oct
(28) |
Nov
(7) |
Dec
(26) |
2004 |
Jan
(44) |
Feb
(9) |
Mar
(17) |
Apr
(26) |
May
(58) |
Jun
(13) |
Jul
(44) |
Aug
(64) |
Sep
(30) |
Oct
(11) |
Nov
(21) |
Dec
(28) |
2005 |
Jan
(29) |
Feb
(11) |
Mar
(11) |
Apr
(22) |
May
(85) |
Jun
(46) |
Jul
(17) |
Aug
(18) |
Sep
(14) |
Oct
(22) |
Nov
(1) |
Dec
(45) |
2006 |
Jan
(20) |
Feb
(36) |
Mar
(18) |
Apr
(24) |
May
(21) |
Jun
(48) |
Jul
(23) |
Aug
(20) |
Sep
(10) |
Oct
(41) |
Nov
(46) |
Dec
(40) |
2007 |
Jan
(40) |
Feb
(20) |
Mar
(13) |
Apr
(6) |
May
(24) |
Jun
(31) |
Jul
(30) |
Aug
(11) |
Sep
(11) |
Oct
(10) |
Nov
(56) |
Dec
(64) |
2008 |
Jan
(64) |
Feb
(22) |
Mar
(63) |
Apr
(28) |
May
(25) |
Jun
(36) |
Jul
(11) |
Aug
(9) |
Sep
(14) |
Oct
(41) |
Nov
(46) |
Dec
(130) |
2009 |
Jan
(95) |
Feb
(41) |
Mar
(24) |
Apr
(35) |
May
(53) |
Jun
(67) |
Jul
(48) |
Aug
(48) |
Sep
(86) |
Oct
(75) |
Nov
(64) |
Dec
(52) |
2010 |
Jan
(57) |
Feb
(31) |
Mar
(28) |
Apr
(40) |
May
(25) |
Jun
(42) |
Jul
(79) |
Aug
(31) |
Sep
(49) |
Oct
(66) |
Nov
(38) |
Dec
(25) |
2011 |
Jan
(29) |
Feb
(18) |
Mar
(44) |
Apr
(6) |
May
(28) |
Jun
(31) |
Jul
(36) |
Aug
(24) |
Sep
(30) |
Oct
(23) |
Nov
(21) |
Dec
(27) |
2012 |
Jan
(14) |
Feb
(11) |
Mar
(2) |
Apr
(48) |
May
(7) |
Jun
(32) |
Jul
(22) |
Aug
(25) |
Sep
(31) |
Oct
(32) |
Nov
(21) |
Dec
(17) |
2013 |
Jan
(44) |
Feb
(27) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(5) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(2) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: zhang x. <th...@ya...> - 2002-12-24 13:08:59
|
Hello!all I am interested in Vpython. Could you tell me that can I creating complex interactive 3D scenes with Vpython? Thanks! Zhang Xianying --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now |
From: Gary P. <pa...@in...> - 2002-12-17 15:04:26
|
Follow up: I installed new Nvidia drivers. Still crashes, but less frequently, I think. If I run programs without Idle, ie from a DOS window, everything works fine. No crashes. To sum up: If I run from Idle with either old or new drivers, I get crashes. If I run the old drivers from either Idle or command line, I get crashes. If I run from the command line *with* new drivers, then no crashes. -gary > I've installed vpython (VPython-2002-12-12) on my Windows98 system. I've > got Numeric 22.0 and python 2.2.2. I'm exploring it for the first time. > I've tried VPython-2002-10-12, but that doesn't work at all. I think I read > that the problem there is incompatibility with Numeric 22.0. > > I'm getting the craziest kind of failure. Sometime after running vpython > apps succesfully a few times, and the number of times can vary from zero to > about 10, a window will pop up telling me that the program has performed an > illegal operation and will be shut down. There is a "close" button on the > window, but it closes neither the window itself, or any of the windows being > used by vpython. There is no way to close that dialog window. In fact, if > I simply move the window out of the way, I can carry on in every respect. > python runs, vpython works, all other Windows apps seem to work. > > However: ctrl-alt-delete does not bring up the Close Program dialog. If > I continue using vpython, the system seems to eventually freeze, and with an > inoperable ctrl-alt-del, I have no option but to cycle power. If I close > all the python windows (except, of course, the error window which will not > close) things seem ok, but eventually other apps start behaving strangely, > and I have to reboot, which I can do in normal fashion from the Start > button. Something's gotten polluted. > > I suppose I could try VPython-2002-10-12 and Numeric 20.3, but shouldn't my > set up work? > > any advice? > thanks, > -gary > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing Channel > http://hpc.devchannel.org/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: jon s. <js...@so...> - 2002-12-15 21:38:30
|
Is there a limit to the capacity of convex? This program causes my computer to reboot(!) when len(numbers) is 8,058. Works fine when len(numbers) is 124. If I change 'convex' to 'curve' the long data set works too. I'm running windows xp home, Visual-2001-12-21. ------------------------------------------------ f=open('test.ach','r') data=f.read() f.close() numbers=data.split()[11:] #trim comments rangenum=range(len(numbers)) for n in rangenum: numbers[n]=int(numbers[n]) if numbers[n] < 0: numbers[n]=0 print len(numbers) from visual import * c=convex(x=rangenum,y=numbers) ------------------------------------------ Jonathan Schull, Ph.D. Sc...@Di... <mailto:Sc...@Di...> http://radio.weblogs.com/0104369/stories/2002/09/24/JonathanSchullOnOnePage. html <http://radio.weblogs.com/0104369/stories/2002/09/24/JonathanSchullOnOnePage .html> 36 Brunswick St., Rochester NY 14607 585-738-6696 cell and v-mail 585-242-9497 landline 978-246-0487 fax ------------------------------------------ |
From: surfer <mc...@we...> - 2002-12-15 17:53:30
|
Me again - I just want to add: the rpm files I mentioned in my email a minute before are the latest versions available at ... ftp://ftp.club-internet.fr/pub/unix/linux/Mandrake-devel/cooker/i586/Mandrake/RPMS/ or ... ftp://fr2.rpmfind.net/linux/Mandrake-devel/cooker/cooker/Mandrake/RPMS/ The files on the Mandrake 9.0 CD's are some weeks older, but will do the same in case they fit in the installation of your running system. Cheers! Martin. -- surfer <mc...@we...> |
From: surfer <mc...@we...> - 2002-12-15 17:48:08
|
Gary, yesterday I tried to find out again why we have a problem with the cvisual modules compilation and installation on Mandrake Linux. Trying to compile with gcc 3.2: =============================== A 1st step further was possible with the hint of Kevin Cole - http://sourceforge.net/mailarchive/message.php?msg_id=2217612 - In <Inst-dir>/VPython/cvisual/CXX/Include/CXX_Config.h you find in line 5: ============================================== #define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 1 ============================================== This one I set to 0: (I wasn't sure what was meant with "to toggle" in the source above - but obviously switch on/off via setting 1 or 0): ============================================== #define STANDARD_LIBRARY_HAS_ITERATOR_TRAITS 0 ============================================== Compilation of the files in cvisual directory continued till platlinux.cpp. Here a failure occurred due to the following string in several files in the /VPython/cvisual directory ======================================= ... " string format(string fs, ...) " ... ======================================= - the three dots seemed to be a problem. O.k. - no way out here for me without help of a c++ experienced person. Finally I stepped back to a solution which ... ============================================== Bruce Sherwood <bas...@un...> set on his info page http://www.vpython.org/morelinux.html . ================================ Here's what I did to get it done: ================================ 1) files I installed (I can't say whether they're all necessary - I only wanted to get the stuff running finally!): Mesa-5.0-2mdk.i586.rpm libMesaGL1-5.0-2mdk.i586.rpm libMesaGLU1-5.0-2mdk.i586.rpm libMesaGLU1-devel-5.0-2mdk.i586.rpm libMesaglut3-5.0-2mdk.i586.rpm libMesaglut3-devel-5.0-2mdk.i586.rpm gcc 3.2 and 2.96: ================= gcc2.96-2.96-0.80mdk.i586.rpm gcc2.96-c++-2.96-0.80mdk.i586.rpm gcc2.96-colorgcc-2.96-0.80mdk.i586.rpm gcc2.96-cpp-2.96-0.80mdk.i586.rpm Assuming that you've installed gcc 3.2 as default, you need, too: gcc-colorgcc-3.2-4mdk.i586.rpm Now you'll find in /etc/ the file colorgccrc: =================================================================== # Define the paths to the actual location of the various compilers. # (Currently, colorgcc only understands these: g++ gcc c++ cc) g++: /usr/bin/g++-3.2 gcc: /usr/bin/gcc-3.2 c++: /usr/bin/g++-3.2 cc: /usr/bin/gcc-3.2 ... =================================================================== I changed / added following lines: =================================================================== #g++: /usr/bin/g++-3.2 #gcc: /usr/bin/gcc-3.2 #c++: /usr/bin/g++-3.2 #cc: /usr/bin/gcc-3.2 g++: /usr/bin/g++-2.96 gcc: /usr/bin/gcc-2.96 c++: /usr/bin/g++-2.96 cc: /usr/bin/gcc-2.96 =================================================================== Now - I checked with ... " [root@mcl]# gcc -v Reading specs from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/specs gcc version 2.96 20000731 (Mandrake Linux 9.0 2.96-0.80mdk) " /local/: ======== In <Inst_dir>/VPython/ I deleted "/local/" from following files: idle: line 2 install: line 2 visual-demos: line3 ./cvisual/ Makefile: line 7 install: line 2 gtkglarea: ========== In this last mentioned file "install" in the cvisual directory ... I commented out the lines regarding installation of the gtkglarea files, because I have installed these (or newer) versions already on my system. I don't remember any other changes. starting the script <Inst-dir>/VPython/install lead to a complete installation in the default /usr/lib/python2.2/... directory. Check path of idle: =================== " [root@mcl idle_VPython]# whereis idle idle: /usr/bin/idle " Start of Demo in path "/usr/share/python-visual/Programs/Demos" =============================================================== I started idle (default /usr/bin/idle) and opened a file in the Demo path: e.g.: "/usr/share/python-visual/Programs/Demos/Tk-Visual.py" Press F5 ... - success! By the way - I'm working with an AMD K7 650MHz noname system and 256MB RAM. Kernel is 2.4.20, Desktop most often KDE 3.1 RCx. Fine: ===== Nevertheless - I still would like to know the reason why we got stuck with the gcc 3.2. Maybe, somebody else in the VPython forum can help us a little. My hope is that somebody could make a more flexible installation script available for download. If you want - give me a feedback. See you ... -- surfer <mc...@we...> |
From: Gary P. <pa...@in...> - 2002-12-15 04:33:07
|
I've installed vpython (VPython-2002-12-12) on my Windows98 system. I've got Numeric 22.0 and python 2.2.2. I'm exploring it for the first time. I've tried VPython-2002-10-12, but that doesn't work at all. I think I read that the problem there is incompatibility with Numeric 22.0. I'm getting the craziest kind of failure. Sometime after running vpython apps succesfully a few times, and the number of times can vary from zero to about 10, a window will pop up telling me that the program has performed an illegal operation and will be shut down. There is a "close" button on the window, but it closes neither the window itself, or any of the windows being used by vpython. There is no way to close that dialog window. In fact, if I simply move the window out of the way, I can carry on in every respect. python runs, vpython works, all other Windows apps seem to work. However: ctrl-alt-delete does not bring up the Close Program dialog. If I continue using vpython, the system seems to eventually freeze, and with an inoperable ctrl-alt-del, I have no option but to cycle power. If I close all the python windows (except, of course, the error window which will not close) things seem ok, but eventually other apps start behaving strangely, and I have to reboot, which I can do in normal fashion from the Start button. Something's gotten polluted. I suppose I could try VPython-2002-10-12 and Numeric 20.3, but shouldn't my set up work? any advice? thanks, -gary |
From: Gary <pa...@in...> - 2002-12-13 18:16:50
|
Hi all. I've got Mandrake 9.0, python 2.2.1, Numeric 21.0. I've tried to follow all the advice, except that I didn't install the Mesa libs. (Could that be my problem? I've got a nicely functioning OpenGL with my NVIDIA card...) I've set the STANDARD_LIBRARY_HAS_ITERATOR_TRAITS flag. One thing I don't know how to do is run g++ at an earlier version. The hints on the web site suggest changing /etc/colorgccrc. My system has no file called colorgccrc. Anyway, here's the first few and last few lines of the output I get when compiling: TIA, Gary -------------------------------------------- [VPython]# ./install Preparing... ########################################### [100%] package gtkglarea-1.2.2-10 is already installed 1:gtkglarea ########################################### [100%] ./install: line 12: /usr/lib/python2.2: is a directory g++ -I. -I./CXX/Include -I/usr/include/python2.2 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -I/usr/X11R6/include -w -c -o arrow.o arrow.cpp In file included from CXX/Include/CXX_Exception.h:10, from CXX/Include/CXX_Objects.h:20, from pvector.h:6, from cvisual.h:6, from display.h:5, from prim.h:5, from axial.h:5, from arrow.cpp:1: CXX/Include/CXX_Config.h:5: parse error before numeric constant In file included from CXX/Include/CXX_Objects.h:20, from pvector.h:6, from cvisual.h:6, from display.h:5, from prim.h:5, from axial.h:5, from arrow.cpp:1: CXX/Include/CXX_Exception.h:21: ISO C++ forbids declaration of `Exception' with no type CXX/Include/CXX_Exception.h:25: ISO C++ forbids declaration of `Exception' with no type CXX/Include/CXX_Exception.h:35: parse error before `}' token CXX/Include/CXX_Exception.h:37: parse error before `{' token ------------------------------------------------------------------------ ...and on and on and on ... and at the end: -------------------------------------------------- CXX/Include/CXX_Objects.h:1480: template argument 1 is invalid CXX/Include/CXX_Objects.h:1480: confused by earlier errors, bailing out make: *** [arrow.o] Error 1 cp: cannot stat `cvisualmodule.so': No such file or directory ----------------------------------------------------- |
From: David S. <da...@vi...> - 2002-12-13 14:36:25
|
The convex hull finding algorithm used internally by cvisual assumes that no four points in the input are coplanar. Since that is not a reasonable requirement to impose on the user, it attempts to randomly jitter the input points by a tiny amount in order to make them noncoplanar without detectably affecting the display. Unfortunately this is not being done correctly: - Since the user is free to create very large or very small convex objects, the jitter is proportional to the "magnitude" of the points used to create the object. This means that the fourth point in m2 (0,0,0) is not jittered at all. That would be fine, except: - The first three points in the object are not jittered (they are treated differently by the algorithm). I don't have a build environment for cvisual and don't have time this morning to set one up. If anyone else wants to fix the problem, it can be done by adding jitter to the three points used to create the initial two faces in recalc(). (See the code at the beginning of addpoint() that jitters a single point). I can also suggest more workarounds for you: 3.) You can create the convex object anywhere other than (0,0,0), or at least ensure that (0,0,0) is not the fourth point in a rectangle. 4.) Use the "faces" object instead of convex: it is more appropriate for rendering large nonconvex models. It is a little more difficult to set up, but *much* more efficient than convex and gives you more control over things like lighting. I think there is sample code somewhere that does extrusions with faces. Dave > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On > Behalf Of Cettinich Edwin (LWE) > Sent: Friday, December 13, 2002 6:14 AM > To: vis...@li... > Subject: [Visualpython-users] incorrect convex objects? > > > Because extrusion objects are not supported in VPython I > create them as a set of convex objects. I found, that some > of them are not drawn correctly. > For instance, please try this code: > > from visual import * > d1=convex(pos=[( 0, 0, 0), ( 0, 1, 0), (-1, 1, 0)]) > d2=convex(pos=[(-1, 1,-1), ( 0, 1,-1), ( 0, 0,-1)]) > m0=convex(pos=[( 0, 0, 0), ( 0, 0,-1), ( 0, 1,-1), ( 0, 1, > 0)]) m1=convex(pos=[( 0, 1, 0), ( 0, 1,-1), (-1, 1,-1), (-1, > 1, 0)]) m2=convex(pos=[(-1, 1, 0), (-1, 1,-1), ( 0, 0,-1), ( > 0, 0, 0)]) > > and watch m2. It is not drawn as rectangle, instead I can > only see the triangle [(-1, 1, 0), (-1, 1,-1), ( 0, 0,-1)]. > > Rotate and shift left m2's pointlist in the above code like this: > m2=convex(pos=[(-1, 1,-1), ( 0, 0,-1), ( 0, 0, 0), (-1, 1, 0)]) > > Now m2 is fully drawn as a rectangle. > > Does anyone know what's wrong and how to get a correct convex object? > > I don't have any idea if there is something wrong and I see > only 2 workarounds: > 1.) I may create a rectangle in the XY-plane and rotate it > appropriately, or > 2.) I may split the rectangle into triangles. > > > Thanks in advance for any answer, > Edwin Cettinich > > > > ------------------------------------------------------- > This sf.net email is sponsored by: > With Great Power, Comes Great Responsibility > Learn to use your power at OSDN's High Performance Computing > Channel http://hpc.devchannel.org/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Cettinich E. (LWE) <edw...@lw...> - 2002-12-13 11:14:24
|
Because extrusion objects are not supported in VPython I=20 create them as a set of convex objects. I found, that some=20 of them are not drawn correctly. For instance, please try this code: from visual import * d1=3Dconvex(pos=3D[( 0, 0, 0), ( 0, 1, 0), (-1, 1, 0)]) d2=3Dconvex(pos=3D[(-1, 1,-1), ( 0, 1,-1), ( 0, 0,-1)]) m0=3Dconvex(pos=3D[( 0, 0, 0), ( 0, 0,-1), ( 0, 1,-1), ( 0, 1, 0)]) m1=3Dconvex(pos=3D[( 0, 1, 0), ( 0, 1,-1), (-1, 1,-1), (-1, 1, 0)]) m2=3Dconvex(pos=3D[(-1, 1, 0), (-1, 1,-1), ( 0, 0,-1), ( 0, 0, 0)]) and watch m2. It is not drawn as rectangle, instead I can=20 only see the triangle [(-1, 1, 0), (-1, 1,-1), ( 0, 0,-1)].=20 Rotate and shift left m2's pointlist in the above code like this: m2=3Dconvex(pos=3D[(-1, 1,-1), ( 0, 0,-1), ( 0, 0, 0), (-1, 1, 0)]) Now m2 is fully drawn as a rectangle. Does anyone know what's wrong and how to get a correct convex object? I don't have any idea if there is something wrong and I see only 2 workarou= nds: 1.) I may create a rectangle in the XY-plane and rotate it appropriately, o= r 2.) I may split the rectangle into triangles. Thanks in advance for any answer, Edwin Cettinich |
From: Bruce S. <bas...@un...> - 2002-12-12 14:00:58
|
Minor update to Windows VPython installer and to the Doc zip file. There was an error in cross-links on the Visual documentation page dealing with floating division. Bruce Sherwood |
From: David S. <da...@vi...> - 2002-12-04 13:58:16
|
I think you are looking for scene.exit = 0 while scene.visible: # do something print "Scene was closed by user" Closing the program is the default behavior for the "close" button, but it can easily be overridden with this method. Setting scene.visible = 0 is the preferred way of closing a display programmatically. Also, in writing functions such as histo, where you want the option to use a specific existing display, I would recommend the following method for dealing with displays: def histo(stacked, data, scene=None): if scene is None: scene = display() # Do plotting with scene # Do user interface loop histo() will use its own display unless the user specifically provides one. Dave > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On > Behalf Of Patrick Keogh > Sent: Wednesday, December 04, 2002 12:05 AM > To: vis...@li... > Subject: [Visualpython-users] Starting and stopping Vpython > programs from Pythonwin > > > As you probably know, if you just close a Vpython display > which was started from a program running under Pythonwin, it > causes Pythonwin to die, even after the program terminates. > > So I had to "invent" a method of gracefully terminating a > Vpython program. Not too difficult I know, but having done > so, I thought I might as well share it. So here is a function > (a histogram plotter), with this capability. > > #!/usr/bin/python > # > # Histo - plot a histogram of stacked cylinders using Vpython > # > # Author Patrick Keogh > # > from visual import * > > def histo(stacked, data): > """ The second parameter which is passed is assumed to be > a sequence, > which has: > - The first element is a sequence of category labels > - The second element is a sequence of data series labels. > - The third element is a sequence of sequences of the > data values > """ > # > # This try/except figures out if there is already a scene. If > not, it creates it. # > try: > type(scene) > except: > scene = display() > scene.show() > max_entries = len(data[0]) > col = (color.red,color.blue,color.green,color.yellow) > data_array = [] > for i in data[2]: > max_entries = max((max_entries, len(i))) > arrow(axis=(max_entries+1,0,0), shaftwidth=0.1, fixedwidth=1) > max_height = 0.0 > for i in range(max_entries): > data_array.append([]) > for j in range(len(data[2])): > data_array[i].append(data[2][j][i]) > max_height=max((max_height,sum(data_array[i]))) > arrow(axis=(0,10,0), shaftwidth=0.1, fixedwidth=1) > for j in range(len(data_array[0])): > > label(pos=(-5,j*2,j*2),text=data[1][j],color=col[j],opacity=0, > box=0,border=0 > ) > for i in range(len(data_array)): > base = 0 > for j in range(len(data_array[i])): > cyl_height = data_array[i][j]*10.0/max_height > if stacked: > pos = (i+1,base,0) > base = base + cyl_height > else: > pos = (i+1,0,j*2) > axis = (0,cyl_height,0) > c = cylinder(pos=pos,axis=axis,radius=0.3,color=col[j]) > c.label = "(" + data[0][i] + "," + > repr(data_array[i][j]) + ")" > scene.center = (len(data_array)/2,5,0) > again = 1 > prev = None > # > # Apart from the standard zoom and rotate capabilities, we will add # > # Left click = Set a new center > # Ctrl-C = Exit > # Move over a bar = Display the (x,y) label for the histogram bar > # Note the "hack" of inserting > the label as an attribute of the > cylinder > # > while again: > while scene.mouse.events: > if scene.mouse.clicked: > scene.center = scene.mouse.getclick().pos > if scene.kb.keys: > if scene.kb.getkey() == 'ctrl+c': > again = 0 > if scene.mouse.pick <> None: > if prev <> scene.mouse.pick: > try: > l.visible = 0 > except: > pass > prev = scene.mouse.pick > if prev.__class__ == cylinder: > l = label(pos=scene.mouse.pos, > text=prev.label, box=0) # # If a control-c was entered, then > the while loop exits, and we close down the display and exit # > scene.hide() > del(scene) > > > > ------------------------------------------------------- > This SF.net email is sponsored by: Microsoft Visual Studio.NET > comprehensive development tool, built to increase your > productivity. Try a free online hosted session at: http://ads.sourceforge.net/cgi-bin/redirect.pl?micr0003en _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Patrick K. <pa...@ke...> - 2002-12-04 05:06:13
|
As you probably know, if you just close a Vpython display which was started from a program running under Pythonwin, it causes Pythonwin to die, even after the program terminates. So I had to "invent" a method of gracefully terminating a Vpython program. Not too difficult I know, but having done so, I thought I might as well share it. So here is a function (a histogram plotter), with this capability. #!/usr/bin/python # # Histo - plot a histogram of stacked cylinders using Vpython # # Author Patrick Keogh # from visual import * def histo(stacked, data): """ The second parameter which is passed is assumed to be a sequence, which has: - The first element is a sequence of category labels - The second element is a sequence of data series labels. - The third element is a sequence of sequences of the data values """ # # This try/except figures out if there is already a scene. If not, it creates it. # try: type(scene) except: scene = display() scene.show() max_entries = len(data[0]) col = (color.red,color.blue,color.green,color.yellow) data_array = [] for i in data[2]: max_entries = max((max_entries, len(i))) arrow(axis=(max_entries+1,0,0), shaftwidth=0.1, fixedwidth=1) max_height = 0.0 for i in range(max_entries): data_array.append([]) for j in range(len(data[2])): data_array[i].append(data[2][j][i]) max_height=max((max_height,sum(data_array[i]))) arrow(axis=(0,10,0), shaftwidth=0.1, fixedwidth=1) for j in range(len(data_array[0])): label(pos=(-5,j*2,j*2),text=data[1][j],color=col[j],opacity=0,box=0,border=0 ) for i in range(len(data_array)): base = 0 for j in range(len(data_array[i])): cyl_height = data_array[i][j]*10.0/max_height if stacked: pos = (i+1,base,0) base = base + cyl_height else: pos = (i+1,0,j*2) axis = (0,cyl_height,0) c = cylinder(pos=pos,axis=axis,radius=0.3,color=col[j]) c.label = "(" + data[0][i] + "," + repr(data_array[i][j]) + ")" scene.center = (len(data_array)/2,5,0) again = 1 prev = None # # Apart from the standard zoom and rotate capabilities, we will add # # Left click = Set a new center # Ctrl-C = Exit # Move over a bar = Display the (x,y) label for the histogram bar # Note the "hack" of inserting the label as an attribute of the cylinder # while again: while scene.mouse.events: if scene.mouse.clicked: scene.center = scene.mouse.getclick().pos if scene.kb.keys: if scene.kb.getkey() == 'ctrl+c': again = 0 if scene.mouse.pick <> None: if prev <> scene.mouse.pick: try: l.visible = 0 except: pass prev = scene.mouse.pick if prev.__class__ == cylinder: l = label(pos=scene.mouse.pos, text=prev.label, box=0) # # If a control-c was entered, then the while loop exits, and we close down the display and exit # scene.hide() del(scene) |
From: Andrew W. <an...@ph...> - 2002-12-03 17:48:49
|
On Tue, 03 Dec 2002 09:24:31 -0800, Bruce Peterson wrote: >looks like my major bottleneck is my video card! Vpython has next to no >overhead for static display (e.g. lots (thousands) of objects in a scene >but just spin and zoom operations using the mouse). The updating of moving >Anyone else have experience with Vpython performance? I've done something that sounds similar - displaying the nearest 2367 galaxies (from the 'Tully Nearby Galaxy Catalog') so you can zoom and spin. Perfectly smooth on both my desktop machine (fairly high end) and my laptop, a 1GHz PIII with a GeForce 2, but I haven't checked the frame rate. The code and data file a at: http://www.physics.uwa.edu.au/Courses/First_Year/OurUniverse/software/tu llys.py and http://www.physics.uwa.edu.au/Courses/First_Year/OurUniverse/software/tu lly.csv Galaxies are displayed as short cylinders for spirals or spheres for ellipticals. The orientations are sadly random, not real, in this version, and the sizes are scaled up by a factor of 10 to make it look better. Left clicking on a galaxy shows the name in a popup label. Andrew |
From: Bruce P. <bap...@te...> - 2002-12-03 17:24:51
|
I've recently been developing an app for data animation using Python/Vpython. After reading all the hits on Python about performance (due to no compilation) my thought was that I would develop a prototype and then replace slow routines with C modules. I suspected that Vpython might be one of those. I've gotten far enough to do some performance testing -- and it looks like my major bottleneck is my video card! Vpython has next to no overhead for static display (e.g. lots (thousands) of objects in a scene but just spin and zoom operations using the mouse). The updating of moving objects could be a bottleneck but on my machine (2.2 Ghz Xeon with 512 meg ram, NVidia Quadro 2 VDI, Windows XP) the practical limit for objects (over 100 or so on screen and you can't really follow anything anyway) is reached before the updating function causes a noticeable delay. The bottom line is I can get 20 fps at virtually any scene complexity and if I want more speed I'll probably have upgrade the hardware. The only thing leading me to replace Vpython is its' lack of translucency for objects. Anyone else have experience with Vpython performance? Bruce Peterson Terastat, Inc Information Access Systems Voice (425) 466 7344 Fax (206) 350 3685 |
From: Bruce S. <bas...@un...> - 2002-12-02 03:31:48
|
Jean-Francois Bouchet pointed out that VPython had gotten behind, in that on Windows it didn't work with Numeric 22.0, the latest version of the Numeric module that is referenced by VPython. All that was required was to recompile, so there is a new Windows installer for VPython at http://vpython.org. Bouchet had suggested the following: > An idea is to do not include Numeric in the VPython distribution and to > create two distributions A and B: > > VPython_A.exe which works with Numeric from release X to release Y > and VPython_B.exe which works with Numeric from release Z to now > > (by this way, a Numeric release change does not require automaticaly an > Update of > VPython distribution) However, I don't see a way to make that work with the binary VPython installer for Windows, since the C++ code for Visual must be compiled against the version of Numeric to be used. I did however keep links on the download page to older versions of VPython, just in case. Only the Windows installer has been changed at this time. Bruce Sherwood |
From: Bruce S. <bas...@un...> - 2002-11-24 23:55:32
|
The error message is easy to explain: the statement "derivative(t,x,xdot,xddot)" is your first mention of xddot, so Python complains. I gather that what you intend is that t, x, and xdot are inputs and xddot is an output, in which case the appropriate structure looks like this, using "return" to get back the result of the operation: def derivative(t, x, xp): xmu = 1.407645794e16 r = mag(x) r3 = r**3 return -xmu*x/r3 t = 2451545.0 x=vector(1.,1.,1.) xdot=vector(1.,1.,1.) xddot = derivative(t, x, xdot) print xddot |
From: Joe H. <hea...@vn...> - 2002-11-24 18:19:36
|
Hi. I have the following Python code: from visual import * def derivative(t,x,xp,xpp): xmu = 1.407645794e16 r = mag(x) r3 = r**3 xpp[0] = -xmu*x[0]/r3 xpp[1] = -xmu*x[1]/r3 xpp[2] = -xmu*x[2]/r3 t = 2451545.0 x=vector(1.,1.,1.) xdot=vector(1.,1.,1.) xmu = 1.407645794e16 #xddot = -xmu*x/(mag(x)**3) #print xddot xddot=vector(0,0,0) x=vector(2.,2.,2.) derivative(t,x,xdot,xddot) print xddot When executed, I get the expected result for xddot. When I modify the code to read: from visual import * def derivative(t,x,xp,xpp): xmu = 1.407645794e16 r = mag(x) r3 = r**3 #xpp[0] = -xmu*x[0]/r3 #xpp[1] = -xmu*x[1]/r3 #xpp[2] = -xmu*x[2]/r3 xpp = -xmu*x/r3 t = 2451545.0 x=vector(1.,1.,1.) xdot=vector(1.,1.,1.) xmu = 1.407645794e16 #xddot = -xmu*x/(mag(x)**3) #print xddot #xddot=vector(0,0,0) x=vector(2.,2.,2.) derivative(t,x,xdot,xddot) print xddot I get the error message: [localhost:~] joe% python testrk4.py Visual-2002-07-22 Traceback (most recent call last): File "testrk4.py", line 22, in ? derivative(t,x,xdot,xddot) NameError: name 'xddot' is not defined [localhost:~] joe% Why does this not work when simply writing xddot = -xmu*x/(mag(x)**3) outside my function works perfectly? I'm lost here, and Lutz and Ascher's book has not helped me. I'm trying to port some QuickBASIC numerical analysis code and I need the capability to pass a vector (a VPython vector, not an ordinary array) into a function, potentially modify that vector's components, and then have the same vector accessible outside the function. I can make it work with arrays but not with vectors. I'd appreciate any help. Cheers, Joe Heafner - Instructional Astronomy and Physics Home Page http://users.vnet.net/heafnerj/index.html I don't have a Lexus, but I do have a Mac. Same thing. |
From: Walter M. <wa...@pa...> - 2002-11-14 18:06:12
|
Hello. I downloaded VPython 2002-07-22. I get segmentation faults in an console when Ctrl-C is pressed: Python 2.2.2 (#4, Oct 15 2002, 04:21:28) [GCC 2.95.4 20011002 (Debian prerelease)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from visual import * Visual-2002-07-22 >>> >>> box() <Primitive object at 0x8157b60> >>> # Here, Ctrl-C was pressed KeyboardInterrupt KeyboardInterrupt >>> Segmentation fault When I run it with gdb or from IDLE the seg fault doesn't happen. Could it be something with the SIGINT handler? I'm running Debian Sid with libc6 2.3.1 on Linux with kernel 2.4.19. Thanks in advance for any help. Walter Moreira |
From: Kevin C. <kj...@gr...> - 2002-11-09 14:40:45
|
So, then... You're up and running? Good to know it worked for someone other than me. ;-) On Sat, Nov 09, 2002 at 05:09:51PM +0800, LUK ShunTim wrote: > Kevin Cole wrote: > > When you say you applied the previous changes, did they include > > the ones mentioned here: > >=20 > > http://sourceforge.net/mailarchive/message.php?msg_id=3D2217612 > >=20 > > (As I recall, I first went through all the README's, INSTALLS's, > > etc that came with VPython, and made all those recommended > > changes... THEN I had to make the changes that I posted in the > > message above.) >=20 > No, I missed that. My search was not thorough enough :-( >=20 > I think it is precisely point #4 in your message. However I'm > surprised as you do that it talked about egcs from which the current > gcc is a descendant. So maybe it was included in earlier versions > like gcc 2.95 (and 2.96 which I found worked) but somehow taken away > again in 3.2? --=20 Kevin Cole, RHCE, Linux Admin | Key ID: 0xE6F332C7 Gallaudet Research Institute | WWW: http://gri.gallaudet.edu/~kjcol= e/ Hall Memorial Bldg S-419 | Voice: (202) 651-5135 Washington, D.C. 20002-3695 | FAX: (202) 651-5746 |
From: LUK S. <Shu...@po...> - 2002-11-09 09:13:17
|
Kevin Cole wrote: > When you say you applied the previous changes, did they include the > ones mentioned here: > > http://sourceforge.net/mailarchive/message.php?msg_id=2217612 > > (As I recall, I first went through all the README's, INSTALLS's, etc > that came with VPython, and made all those recommended changes... THEN > I had to make the changes that I posted in the message above.) > No, I missed that. My search was not thorough enough :-( I think it is precisely point #4 in your message. However I'm surprised as you do that it talked about egcs from which the current gcc is a descendant. So maybe it was included in earlier versions like gcc 2.95 (and 2.96 which I found worked) but somehow taken away again in 3.2? Thanks very much, ST -- |
From: Kevin C. <kj...@gr...> - 2002-11-08 18:48:34
|
When you say you applied the previous changes, did they include the ones mentioned here: http://sourceforge.net/mailarchive/message.php?msg_id=2217612 (As I recall, I first went through all the README's, INSTALLS's, etc that came with VPython, and made all those recommended changes... THEN I had to make the changes that I posted in the message above.) Hope that helps you... On Fri, 8 Nov 2002 shu...@po... wrote: > Dear all, > > I'd like to report that in compiling vpython in redhat 8.0 (gcc 3.2 and > python 2.2.1) I encountered the same error that was reported some time > ago to the list. Here's the excerpt: > > <quote> > g++ -I. -I./CXX/Include -I/usr/include/python2.2 > -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include > -D_REENTRANT -I/usr/X11R6/include -w -c -o arrow.o arrow.cpp > In file included from pvector.h:6, > from cvisual.h:6, > from display.h:5, > from prim.h:5, > from axial.h:5, > from arrow.cpp:1: > CXX/Include/CXX_Objects.h:967: no class template named > `random_access_iterator' in `std' > CXX/Include/CXX_Objects.h:1077: no class template named > `random_access_iterator > ' in `std' > </quote> > > I have applied all necessary changes discussed previously. > > I guess the problem is due to some missing headers in the C++ library > files in the gcc 3.2 compiler suite that comes with redhat 8.0. I have > not tried reverting to gcc 2.95 as suggested in one of the messages > posted. Has anyone done that and got success? > > Regards, > ST > -- > > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > -- Kevin Cole, RHCE, Linux Admin | Key ID: 0xE6F332C7 Gallaudet Research Institute | WWW: http://gri.gallaudet.edu/~kjcole/ Hall Memorial Bldg S-419 | Voice: (202) 651-5135 Washington, D.C. 20002-3695 | FAX: (202) 651-5746 |
From: surfer <mc...@we...> - 2002-11-08 13:51:57
|
Hello ST, after installing Mandrake 9.0 download version (with gcc 3.2 as std. compiler) I had the problem as I described it some months before again. The only way I know up to now is the one I described with gcc 2.96 or gcc 2.95. I'll be back in a week. Cheers! Martin. Am Fre, 2002-11-08 um 14.22 schrieb shu...@po...: > Dear all, > > I'd like to report that in compiling vpython in redhat 8.0 (gcc 3.2 and > python 2.2.1) I encountered the same error that was reported some time > ago to the list. Here's the excerpt: > > <quote> > g++ -I. -I./CXX/Include -I/usr/include/python2.2 > -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include > -D_REENTRANT -I/usr/X11R6/include -w -c -o arrow.o arrow.cpp > In file included from pvector.h:6, > from cvisual.h:6, > from display.h:5, > from prim.h:5, > from axial.h:5, > from arrow.cpp:1: > CXX/Include/CXX_Objects.h:967: no class template named > `random_access_iterator' in `std' > CXX/Include/CXX_Objects.h:1077: no class template named > `random_access_iterator > ' in `std' > </quote> > > I have applied all necessary changes discussed previously. > > I guess the problem is due to some missing headers in the C++ library > files in the gcc 3.2 compiler suite that comes with redhat 8.0. I have > not tried reverting to gcc 2.95 as suggested in one of the messages > posted. Has anyone done that and got success? > > Regards, > ST > -- > > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! > http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: <shu...@po...> - 2002-11-08 13:29:03
|
Dear all, I'd like to report that in compiling vpython in redhat 8.0 (gcc 3.2 and python 2.2.1) I encountered the same error that was reported some time ago to the list. Here's the excerpt: <quote> g++ -I. -I./CXX/Include -I/usr/include/python2.2 -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -D_REENTRANT -I/usr/X11R6/include -w -c -o arrow.o arrow.cpp In file included from pvector.h:6, from cvisual.h:6, from display.h:5, from prim.h:5, from axial.h:5, from arrow.cpp:1: CXX/Include/CXX_Objects.h:967: no class template named `random_access_iterator' in `std' CXX/Include/CXX_Objects.h:1077: no class template named `random_access_iterator ' in `std' </quote> I have applied all necessary changes discussed previously. I guess the problem is due to some missing headers in the C++ library files in the gcc 3.2 compiler suite that comes with redhat 8.0. I have not tried reverting to gcc 2.95 as suggested in one of the messages posted. Has anyone done that and got success? Regards, ST -- |
From: Bruce S. <bas...@un...> - 2002-11-06 19:07:53
|
And thanks much for the additional tutorial! (There are SO many Python capabilities that I haven't used before....) Bruce Sherwood ----- Original Message ----- From: "David Scherer" <da...@vi...> To: "'Bruce Sherwood'" <bas...@un...>; "'Cettinich Edwin (LWE)'" <edw...@lw...>; <vis...@li...> Sent: Wednesday, November 06, 2002 8:23 AM Subject: RE: [Visualpython-users] 1 objectlist and 2 displays > > exec 'newobj.'+member+'=obj.'+member # set attribute > > can be written without exec: > > setattr(newobj,member,getattr(obj,member)) > > Dave |
From: David S. <da...@vi...> - 2002-11-06 13:23:12
|
> exec 'newobj.'+member+'=obj.'+member # set attribute can be written without exec: setattr(newobj,member,getattr(obj,member)) Dave > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On > Behalf Of Bruce Sherwood > Sent: Wednesday, November 06, 2002 8:13 AM > To: Cettinich Edwin (LWE); vis...@li... > Subject: Re: [Visualpython-users] 1 objectlist and 2 displays > > > Thanks much for showing me how to avoid the dictionary! > > Bruce Sherwood > > ----- Original Message ----- > From: "Cettinich Edwin (LWE)" <edw...@lw...> > To: "Bruce Sherwood" <bas...@un...>; > <vis...@li...> > Sent: Wednesday, November 06, 2002 4:35 AM > Subject: AW: [Visualpython-users] 1 objectlist and 2 displays > > > Thanks a lot. That helps. > > Although I prefer a solution with exactly one object shown in > two displays my hope has gone and I suppose it will not be > realizable. So I'll go to implement some obj-management which > can handle several displays. > > By the way: There is no need to convert obj.__class__ to a > character string. Here's your program without dictionary: > ################################ from visual import * > > x = 300 > y = 400 > w = 200 > h = 200 > eyeangle = 0.15 # interocular angle > left = display(x=x, y=y, width=w, height=h) > right = display(x=x+w, y=y, width=w, height=h) > left.select() > > b1=box(pos=(-1,0,0), color=color.red) > b2=box(pos=(1,-1,0), color=color.cyan) > a1=arrow(pos=(-0.5,0,0), axis=(1,-1,0), color=color.yellow) > > right.select() > for obj in left.objects: > newobj=obj.__class__() # create > object in 2nd > window > for member in obj.__members__: > if member == 'display': continue # avoid putting into scene1 > exec 'newobj.'+member+'=obj.'+member # set attribute > > while 1: > right.up = left.up > leftforward = left.center-left.mouse.camera > right.forward = rotate(leftforward, angle=eyeangle, > axis=left.up) ################################ > > Edwin Cettinich > > > > > ------------------------------------------------------- > This sf.net email is sponsored by: See the NEW Palm > Tungsten T handheld. Power & Color in a compact size! http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users |