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: Bruce S. <Bru...@nc...> - 2007-06-14 23:29:52
|
You might study the example program faces_heightfield.py that comes with VPython, as it creates a surface. The most general VPython object is "faces" which lets you display arbitrary triangles and specify lighting at vertices. This low-level object could be used to display a portion of a sphere. Or if you want to display a portion of a sphere as a grid, use the "curve" object. There exists a beta version of VPython which lets you specify that an object is transparent. See the "Recent developments" section of vpython.org. Unfortunately the Windows version has some serious bugs (see the documentation in the Recent developments section) and there is no Macintosh version. The Linux version mostly works correctly. Bruce Sherwood pri...@gm... wrote: > hi folks, > > I am new to VPython so this question may sound a little bit naive; > I've got a question concerning the problem how to visiualize a 2D-manifold in Vypthon. In this special case, the parameters are Theta and Phi to just plot a part of the surface of a sphere, where the Radius is constant. An additional feature would be that the surface is something like transparent or it also could be a spherical grid. I hope my english is not too bad, so that some of you could understand what my problem currently is. I hope I'll receive any help soon. > > Thank you very much. > > greets from germany > > -Philipp > |
From: <pri...@gm...> - 2007-06-14 18:45:52
|
hi folks, I am new to VPython so this question may sound a little bit naive; I've got a question concerning the problem how to visiualize a 2D-manifold in Vypthon. In this special case, the parameters are Theta and Phi to just plot a part of the surface of a sphere, where the Radius is constant. An additional feature would be that the surface is something like transparent or it also could be a spherical grid. I hope my english is not too bad, so that some of you could understand what my problem currently is. I hope I'll receive any help soon. Thank you very much. greets from germany -Philipp -- GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS. Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail |
From: Bruce S. <Bru...@nc...> - 2007-06-03 15:35:18
|
This may not be entirely relevant, but I note that Visual is not as flexible as it ought to be in specifying x and y in a gdisplay. Your program works on my Windows machine only after changing x=0.0 to x=0 and y-0.0 to y=0 in display1 = gdisplay(.....). It makes sense for these pixel arguments to be integers, but it's silly/wrong not to accept 0.0. However, I don't see how this issue relates to the problems you're seeing. The only thing I can think of would be that you could try updating the graphics driver on your machine. Sometimes an old driver has problems with OpenGL. Bruce Sherwood Fred Sells wrote: > I'm running XP with all patches uptodate. Same problem with python > 2.4.4 and 2.5.1. > > A simple demo program crashes python. I checked site-packages and it > has numarray, numpy, Numeric and visual folders > > I'm trying some sample code from the web site (attached) and get this > useless error (attached) to notify microsoft of the crash. It's greek > to me, but perhaps it means something to the guru's here. > I also get this erroneous python error, so I wonder if the python.exe is > hosed. but I've installed/reinstalled several times. I've tried running > from within Eclipse and from command line with the same results. > > On my computer at work, no problem with python 2.4.4. I don't know what > to try next. I'm running this on an older laptop PIII 1.2Ghz with 512M > RAM if that matters. > > for x in range(x_start, x_end, 0.1): > Traceback (most recent call last): > File "C:\all\projects\calculus\src\chartfunction.py", line 20, in <module> > for x in range(x_start, x_end, 0.1): > ValueError: range() step argument must not be zero > > > > ------------------------------------------------------------------------ > > from visual.graph import * # import graphing features > import sys > display1 = gdisplay(x=0.0, y=0.0, width=300, height=200, > title='Cos Graph', xtitle='X', ytitle='Y', > xmax=10., xmin=-10., ymax=3., ymin=-3., > foreground=color.black, background=color.white) > > #display2 = gdisplay(x=0, y=200, width=300, height=200, > # title='Sin Graph', xtitle='X', ytitle='Y', > # xmax=10., xmin=-10., ymax=3., ymin=-3., > # foreground=color.black, background=color.white) > > graph = gcurve(gdisplay=display1,color=color.cyan) # a connected curve object > #graph2 = gcurve(gdisplay=display2,color=color.blue) > > > x_start= -8. # graph starting from this x value > x_end = 8. # graph ending at this x value > > for x in range(x_start, x_end, 0.1): > y = cos(x) # the function we want to graph > print x,y > continue > graph.plot(pos=(x,y)) # plots a point > > # y = sin(x) # the function we want to graph > # graph2.plot(pos=(x,y)) # plots a point > |
From: Fred S. <bu...@ya...> - 2007-06-03 02:03:00
|
from visual.graph import * # import graphing features import sys display1 = gdisplay(x=0.0, y=0.0, width=300, height=200, title='Cos Graph', xtitle='X', ytitle='Y', xmax=10., xmin=-10., ymax=3., ymin=-3., foreground=color.black, background=color.white) #display2 = gdisplay(x=0, y=200, width=300, height=200, # title='Sin Graph', xtitle='X', ytitle='Y', # xmax=10., xmin=-10., ymax=3., ymin=-3., # foreground=color.black, background=color.white) graph = gcurve(gdisplay=display1,color=color.cyan) # a connected curve object #graph2 = gcurve(gdisplay=display2,color=color.blue) x_start= -8. # graph starting from this x value x_end = 8. # graph ending at this x value for x in range(x_start, x_end, 0.1): y = cos(x) # the function we want to graph print x,y continue graph.plot(pos=(x,y)) # plots a point # y = sin(x) # the function we want to graph # graph2.plot(pos=(x,y)) # plots a point |
From: Bill W. <ww...@la...> - 2007-05-31 15:41:00
|
Sorry Theo! I guess the lesson is test your code before posting to the list, no matter what. At least Rodney had a "classic Python" issue, mine is more just bone-headed. In cutting and pasting the Frame class from my little module, I omitted the declaration below, and that's the source of the problem. It just creates a 'show' function that will work on any visual object, not just a Frame instance. I didn't notice the call to it buried in the class declaration (funny that it reaches into email.py, otherwise!). def show(obj, state=None): """Set the visible tag of an object, or, if an object.show() exists, (see Frame class below), propagate the call to set internal objects. Call with a Boolean argument, or None to toggle current visibility state.""" if hasattr(obj,'show'): obj.show(state) else: if state == None: obj.visible = not obj.visible else: obj.visible = state There was another over simplification with my use of scene.kb, so I'm attaching a complete example that should work without confusion, and I added a demo of how I might do animation with it also. Let me know if it gives you any more headaches. Bill -----Original Message----- From: vis...@li... [mailto:vis...@li...] On Behalf Of Theo DuBose Sent: Wednesday, May 30, 2007 7:19 PM To: vpython Subject: Re: [Visualpython-users] Visibility Bug? Bill, Thanks, that seems like a good idea, but when I try to use it, I get the error: Traceback (most recent call last): File "/Users/Theo/Documents/email2.py", line 7, in <module> f.show(0) File "/Users/Theo/Documents/email.py", line 11, in show show(obj,self.visible) NameError: global name 'show' is not defined I assume this is a problem with recursion; how do I fix this? Thanks, Theo ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Theo D. <td...@st...> - 2007-05-31 02:19:06
|
Bill, Thanks, that seems like a good idea, but when I try to use it, I get the error: Traceback (most recent call last): File "/Users/Theo/Documents/email2.py", line 7, in <module> f.show(0) File "/Users/Theo/Documents/email.py", line 11, in show show(obj,self.visible) NameError: global name 'show' is not defined I assume this is a problem with recursion; how do I fix this? Thanks, Theo |
From: Dunning, R. <dun...@lo...> - 2007-05-30 21:57:34
|
> Hi Theo, > > As Bruce and Rodney have said, it's not a bug, it's a > feature! But not one of my favorites. Just a guess: probably it was thought that programmers would find it easier to loop over the objects in a scene (or frame) without having to explicitly check for visibility. Perhaps the assumption was that any loop over objects would very likely only need to target the visible objects in the scene. About my "fix," look at this line: scene.my_objects = spheres This line simply attaches the name "scene.my_objects" to the same list referenced by "spheres." If you later on append an object to scene.my_objects, it gets appended to the spheres list as well (it's the *same* list)--very likely this isn't what you want. A classic Python gotcha! -- Rodney Dunning Assistant Professor of Physics Longwood University http://www.longwood.edu/staff/dunningrb > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On > Behalf Of Bill Ward > Sent: Wednesday, May 30, 2007 2:53 PM > To: Vis...@li... > Subject: Re: [Visualpython-users] Visibility Bug? > > Hi Theo, > > As Bruce and Rodney have said, it's not a bug, it's a > feature! But not one of my favorites. I understand the new > beta will obey "frame.visible = 0" to do what you want, but > sometimes you may want to be selective, say you want to hide > only certain types of objects, so you want to turn maintain > your own list anyway. > > My solution has been to write an new "Frame" subclass of > "frame", and give it methods that are convenient. Here's > that bit of code in case you find it > instructive: > > class Frame(frame): > """Subclass visual's frame to add some convenient functions. > Specifically, > make the .visible attribute do what you expect (show or > hide all the > objects in a frame). """ > > def show(self, state=None): > """ Set visibility of all objects in the frame to > 'state'. If state is absent, > toggle the visibility. Note that the .objects > attribute does not report > hidden objects, so first a parallel list has to be created. > """ > #On the first call, create the all_objects list > (might be cleaner to use our own __init__()? ) > > if not hasattr(self,'all_objects'): #store all > objects (not just > visible) > self.all_objects = self.objects[:] > if state == None: > self.visible = not self.visible > else: > self.visible = state > for obj in self.all_objects: > show(obj,self.visible) > > def animate(self, *args): > """ Animate all the visible objects in the frame that > have their own > animate() functions defined. Pass through everything > in *args. > """ > if self.visible: > for o in self.objects: #loop visible objects only > if o and hasattr(o,'animate'): > o.animate(*args) > > To use it: > > f = Frame() > box(frame=f) > box(y=2,frame=f) > f.show(False) #make frame, a couple of objects, and hide initially > > while 1: > if scene.kb.keys: # keyboard event in main scene? > f.show() #toggle the objects in f on any key press > > I have this class in a module of stuff I import everywhere > and it tidies things up for me a bit. I hope it's a useful example! > > Bill Ward > > P.S. The last "animate" function is a little distraction I > left in, so let me explain what that means briefly. I often > use a new class definition to generate my objects, and then > declare an animate() method inside that. So if my scene has > a Frame "f" I can just call, for example, "f.animate(coswt, > sinwt)", and if all the custom moving objects in the Frame > have a bound "animate" method that expects two arguments of > that form, I'm done. > > Sorry to muddy things up. You can lose that bit of code or > leave it, it should be harmless. > > > > > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On > Behalf Of Bruce Sherwood > Sent: Wednesday, May 30, 2007 11:03 AM > Cc: vpython > Subject: Re: [Visualpython-users] Visibility Bug? > > From the Visual reference manual (on the Help manual in VPython): > > ------------------------ > Another frame attribute is objects, which is a list of > currently visible objects contained in the frame (the list > does not include objects that are currently invisible). If > you want to make all the objects in a frame be red, do the > following (assume the frame is named f): > > for obj in f.objects: > obj.color = color.red > > If you use this method to make all the objects invisible, the > f.objects list will be empty. If you need a list containing > all the objects, both visible and invisible, you need to > maintain your own list of objects. > -------------------------- > > In the new beta version there is this new feature: "You can > now make a frame visible or invisible, and all objects in the > frame will be affected. And you can set the vector "scale" > attribute of a frame to change the size of the combined object." > > Bruce Sherwood > > Theo DuBose wrote: > > Hello, > > > > I have noticed what appears to be a bug when dealing > with frames > > and visibility. If I make all the objects in the frame > disappear, with > > > > for obj in a.objects: > > obj.visible = 0 > > > > and then attempt to make the objects reappear with > > > > > > for obj in a.objects: > > obj.visible = 0 > > > > They do not appear. Is this a known, or does anyone have any > > suggestions? Presently I am overcoming this by reinstantiating the > > invisible objects, but i would like to be able to reduce > the amount of > > memory this uses. > > > > Thanks, > > Theo > > > > > ---------------------------------------------------------------------- > > --- This SF.net email is sponsored by DB2 Express Download > DB2 Express > > C - the FREE version of DB2 express and take control of > your XML. No > > limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Visualpython-users mailing list > > Vis...@li... > > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express Download DB2 > Express C - the FREE version of DB2 express and take control > of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express Download DB2 > Express C - the FREE version of DB2 express and take control > of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Bill W. <ww...@la...> - 2007-05-30 18:53:23
|
Hi Theo, As Bruce and Rodney have said, it's not a bug, it's a feature! But not one of my favorites. I understand the new beta will obey "frame.visible = 0" to do what you want, but sometimes you may want to be selective, say you want to hide only certain types of objects, so you want to turn maintain your own list anyway. My solution has been to write an new "Frame" subclass of "frame", and give it methods that are convenient. Here's that bit of code in case you find it instructive: class Frame(frame): """Subclass visual's frame to add some convenient functions. Specifically, make the .visible attribute do what you expect (show or hide all the objects in a frame). """ def show(self, state=None): """ Set visibility of all objects in the frame to 'state'. If state is absent, toggle the visibility. Note that the .objects attribute does not report hidden objects, so first a parallel list has to be created. """ #On the first call, create the all_objects list (might be cleaner to use our own __init__()? ) if not hasattr(self,'all_objects'): #store all objects (not just visible) self.all_objects = self.objects[:] if state == None: self.visible = not self.visible else: self.visible = state for obj in self.all_objects: show(obj,self.visible) def animate(self, *args): """ Animate all the visible objects in the frame that have their own animate() functions defined. Pass through everything in *args. """ if self.visible: for o in self.objects: #loop visible objects only if o and hasattr(o,'animate'): o.animate(*args) To use it: f = Frame() box(frame=f) box(y=2,frame=f) f.show(False) #make frame, a couple of objects, and hide initially while 1: if scene.kb.keys: # keyboard event in main scene? f.show() #toggle the objects in f on any key press I have this class in a module of stuff I import everywhere and it tidies things up for me a bit. I hope it's a useful example! Bill Ward P.S. The last "animate" function is a little distraction I left in, so let me explain what that means briefly. I often use a new class definition to generate my objects, and then declare an animate() method inside that. So if my scene has a Frame "f" I can just call, for example, "f.animate(coswt, sinwt)", and if all the custom moving objects in the Frame have a bound "animate" method that expects two arguments of that form, I'm done. Sorry to muddy things up. You can lose that bit of code or leave it, it should be harmless. -----Original Message----- From: vis...@li... [mailto:vis...@li...] On Behalf Of Bruce Sherwood Sent: Wednesday, May 30, 2007 11:03 AM Cc: vpython Subject: Re: [Visualpython-users] Visibility Bug? From the Visual reference manual (on the Help manual in VPython): ------------------------ Another frame attribute is objects, which is a list of currently visible objects contained in the frame (the list does not include objects that are currently invisible). If you want to make all the objects in a frame be red, do the following (assume the frame is named f): for obj in f.objects: obj.color = color.red If you use this method to make all the objects invisible, the f.objects list will be empty. If you need a list containing all the objects, both visible and invisible, you need to maintain your own list of objects. -------------------------- In the new beta version there is this new feature: "You can now make a frame visible or invisible, and all objects in the frame will be affected. And you can set the vector "scale" attribute of a frame to change the size of the combined object." Bruce Sherwood Theo DuBose wrote: > Hello, > > I have noticed what appears to be a bug when dealing with frames and > visibility. If I make all the objects in the frame disappear, with > > for obj in a.objects: > obj.visible = 0 > > and then attempt to make the objects reappear with > > > for obj in a.objects: > obj.visible = 0 > > They do not appear. Is this a known, or does anyone have any > suggestions? Presently I am overcoming this by reinstantiating the > invisible objects, but i would like to be able to reduce the amount of > memory this uses. > > Thanks, > Theo > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2007-05-30 18:03:35
|
From the Visual reference manual (on the Help manual in VPython): ------------------------ Another frame attribute is objects, which is a list of currently visible objects contained in the frame (the list does not include objects that are currently invisible). If you want to make all the objects in a frame be red, do the following (assume the frame is named f): for obj in f.objects: obj.color = color.red If you use this method to make all the objects invisible, the f.objects list will be empty. If you need a list containing all the objects, both visible and invisible, you need to maintain your own list of objects. -------------------------- In the new beta version there is this new feature: "You can now make a frame visible or invisible, and all objects in the frame will be affected. And you can set the vector "scale" attribute of a frame to change the size of the combined object." Bruce Sherwood Theo DuBose wrote: > Hello, > > I have noticed what appears to be a bug when dealing with frames and > visibility. If I make all the objects in the frame disappear, with > > for obj in a.objects: > obj.visible = 0 > > and then attempt to make the objects reappear with > > > for obj in a.objects: > obj.visible = 0 > > They do not appear. Is this a known, or does anyone have any > suggestions? Presently I am overcoming this by reinstantiating the > invisible objects, but i would like to be able to reduce the amount of > memory this uses. > > Thanks, > Theo > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Dunning, R. <dun...@lo...> - 2007-05-30 17:46:56
|
Theo, "objects" is list of all *visible* objects in the display. When you loop over scene.objects, any objects tagged as invisible are automatically skipped in the loop because they're not part of that list. I'm not sure I would call this a bug--it's how the class is coded. I came up with the following that may do what you need. (By the way, if you chose to reinstantiate the non-visible objects, the memory tied up by the former objects should be released.) from visual import * rate(10) spheres = [] for i in xrange(7): spheres.append(sphere(pos=vector(i*3,0,0))) scene.my_objects = spheres for i in scene.objects: i.visible = 0 print "They're gone!" print "Bring them back" for j in scene.objects: j.visible = 1 # Doesn't work, as you've discovered. print "Now try it." for a in scene.my_objects: # This will work. a.visible = 1 # Hope this helps. -- Rodney Dunning Assistant Professor of Physics Longwood University http://www.longwood.edu/staff/dunningrb > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On > Behalf Of Theo DuBose > Sent: Wednesday, May 30, 2007 1:31 PM > To: vpython > Subject: [Visualpython-users] Visibility Bug? > > Hello, > > I have noticed what appears to be a bug when dealing with > frames and visibility. If I make all the objects in the frame > disappear, with > > for obj in a.objects: > obj.visible = 0 > > and then attempt to make the objects reappear with > > > for obj in a.objects: > obj.visible = 0 > > They do not appear. Is this a known, or does anyone have any > suggestions? Presently I am overcoming this by > reinstantiating the invisible objects, but i would like to be > able to reduce the amount of memory this uses. > > Thanks, > Theo > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express Download DB2 > Express C - the FREE version of DB2 express and take control > of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Theo D. <td...@st...> - 2007-05-30 17:42:07
|
Ah, sorry, i meant for the second example to be for obj in a.objects: obj.visible = 1 That error was from copy/paste within the email, not my code. |
From: Theo D. <td...@st...> - 2007-05-30 17:31:17
|
Hello, I have noticed what appears to be a bug when dealing with frames and visibility. If I make all the objects in the frame disappear, with for obj in a.objects: obj.visible = 0 and then attempt to make the objects reappear with for obj in a.objects: obj.visible = 0 They do not appear. Is this a known, or does anyone have any suggestions? Presently I am overcoming this by reinstantiating the invisible objects, but i would like to be able to reduce the amount of memory this uses. Thanks, Theo |
From: Noko P. <np...@an...> - 2007-05-25 07:09:18
|
Thank you. I think I will be fine from here -:) -----Original Message----- From: vis...@li... [mailto:vis...@li...] On Behalf Of Bruce Sherwood Sent: 24 May 2007 06:31 PM To: vis...@li... Subject: Re: [Visualpython-users] FW: 3D Matrix visualization and rotation I see I misspoke. It is the color attribute you would set (as well as=20 the pos attribute). Bruce Sherwood Noko Phala wrote: > Instead of placing text, I would like to place objects (say spheres) > whose color depend on the numerical value of the entry at the position > (x,y,z). Something like: > for i in range (1,n): > for j in range (1,n): > for k in range (1,n): > if m(i,j,k)=3D=3D=3D0: #m=3D3D matrix > display a red circle > elif m(i,j,k)=3D=3D1: > dislay a blue circle > else: > display a green circle > I gather from your response thatthis is probably possible with the > "label" functionality. > Thanks, > Noko Phala > > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On Behalf Of > Bruce Sherwood > Sent: 24 May 2007 12:53 AM > To: vis...@li... > Subject: Re: [Visualpython-users] FW: 3D Matrix visualization and > rotation > > I'm not sure what question you're asking, but there does exist the=20 > "label" object which can be used to place text at locations in space. > > Bruce Sherwood > > Noko Phala wrote: > =20 >> Hi, >> >> I would like to visualize a 3D Matrix (with numbers) using VPython. Is >> =20 > > =20 >> this possible? >> >> Regards, >> >> Noko >> =20 > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > =20 ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2007-05-24 16:31:25
|
I see I misspoke. It is the color attribute you would set (as well as the pos attribute). Bruce Sherwood Noko Phala wrote: > Instead of placing text, I would like to place objects (say spheres) > whose color depend on the numerical value of the entry at the position > (x,y,z). Something like: > for i in range (1,n): > for j in range (1,n): > for k in range (1,n): > if m(i,j,k)===0: #m=3D matrix > display a red circle > elif m(i,j,k)==1: > dislay a blue circle > else: > display a green circle > I gather from your response thatthis is probably possible with the > "label" functionality. > Thanks, > Noko Phala > > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On Behalf Of > Bruce Sherwood > Sent: 24 May 2007 12:53 AM > To: vis...@li... > Subject: Re: [Visualpython-users] FW: 3D Matrix visualization and > rotation > > I'm not sure what question you're asking, but there does exist the > "label" object which can be used to place text at locations in space. > > Bruce Sherwood > > Noko Phala wrote: > >> Hi, >> >> I would like to visualize a 3D Matrix (with numbers) using VPython. Is >> > > >> this possible? >> >> Regards, >> >> Noko >> > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Bruce S. <Bru...@nc...> - 2007-05-24 16:30:30
|
If you simply want to display spheres at specified locations, that's easy. Just give the "pos" attribute of the sphere as pos=(i,j,k). The label object isn't relevant (it's just for displaying text). See the VPython reference manual for more information, available at vpython.org and installed with VPython. Also see the tutorial available at vpython.org. Bruce Sherwood Noko Phala wrote > Instead of placing text, I would like to place objects (say spheres) > whose color depend on the numerical value of the entry at the position > (x,y,z). Something like: > for i in range (1,n): > for j in range (1,n): > for k in range (1,n): > if m(i,j,k)===0: #m=3D matrix > display a red circle > elif m(i,j,k)==1: > dislay a blue circle > else: > display a green circle > I gather from your response thatthis is probably possible with the > "label" functionality. > Thanks, > Noko Phala > > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...] On Behalf Of > Bruce Sherwood > Sent: 24 May 2007 12:53 AM > To: vis...@li... > Subject: Re: [Visualpython-users] FW: 3D Matrix visualization and > rotation > > I'm not sure what question you're asking, but there does exist the > "label" object which can be used to place text at locations in space. > > Bruce Sherwood > > Noko Phala wrote: > >> Hi, >> >> I would like to visualize a 3D Matrix (with numbers) using VPython. Is >> > > >> this possible? >> >> Regards, >> >> Noko >> > > ------------------------------------------------------------------------ > - > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Noko P. <np...@an...> - 2007-05-24 10:10:34
|
Instead of placing text, I would like to place objects (say spheres) whose color depend on the numerical value of the entry at the position (x,y,z). Something like: for i in range (1,n): for j in range (1,n): for k in range (1,n): if m(i,j,k)=3D=3D=3D0: #m=3D3D matrix display a red circle elif m(i,j,k)=3D=3D1: dislay a blue circle else: display a green circle I gather from your response thatthis is probably possible with the "label" functionality. Thanks, Noko Phala -----Original Message----- From: vis...@li... [mailto:vis...@li...] On Behalf Of Bruce Sherwood Sent: 24 May 2007 12:53 AM To: vis...@li... Subject: Re: [Visualpython-users] FW: 3D Matrix visualization and rotation I'm not sure what question you're asking, but there does exist the=20 "label" object which can be used to place text at locations in space. Bruce Sherwood Noko Phala wrote: > Hi, >=20 > I would like to visualize a 3D Matrix (with numbers) using VPython. Is > this possible? >=20 > Regards, >=20 > Noko ------------------------------------------------------------------------ - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2007-05-23 22:53:10
|
I'm not sure what question you're asking, but there does exist the "label" object which can be used to place text at locations in space. Bruce Sherwood Noko Phala wrote: > Hi, > > I would like to visualize a 3D Matrix (with numbers) using VPython. Is > this possible? > > Regards, > > Noko |
From: Noko P. <np...@an...> - 2007-05-23 12:03:07
|
Hi, I would like to visualize a 3D Matrix (with numbers) using VPython. Is this possible? Regards, Noko =20 |
From: Bruce S. <Bru...@nc...> - 2007-05-22 17:58:02
|
Jose Antonio has resolved his problem with installing VPython for Python 2.5 on Windows. It turns out that he has two installations of Python on his machine, one on the C drive and one on the E drive. The VPython installer saw a numeric on the C drive and so didn't think there was any need to install it, despite the fact that he was trying to install to the E drive. Confusion. Bruce Sherwood |
From: Bruce S. <Bru...@nc...> - 2007-05-22 17:12:56
|
Thanks for showing the VPython installer page. The reason that Numeric doesn't show up as a choice is because it is BUILT INTO the VPython installer. You don't need to install Numeric separately, and no choice is offered. The reason why Numeric is built into the VPython installer for Python 2.5 is precisely because Numeric itself has been made unavailable, to force people to migrate to numpy, as you say. As a stop-gap measure, last fall I compiled Numeric from the still-available source code and bundled it into the VPython installer for Windows, so that there would be a VPython for Python 2.5 on Windows. The long-term solution is to get the beta version of VPython working on Windows (and Mac), with its reliance on numpy. So I say again, after running the VPython installer you should see in c:\Python25\Lib\site-packages a folder for numeric as well as a folder for visual. Do you see both of these folders? Then it's a separate question why you're unable to run. Bruce José Antonio Martín H wrote: > Hi, Bruce > This is what I get. > I have removed and resintalled vpython but the problem still remains. > > Also, I cannot find any Numeric for python 2.5 !!! It seems that i was > deleted in order to force people to migrate to the new Numpy. > Bests. > jose. > |
From: <jam...@fd...> - 2007-05-22 16:01:06
|
Hi, Bruce This is what I get. I have removed and resintalled vpython but the problem still remains. Also, I cannot find any Numeric for python 2.5 !!! It seems that i was deleted in order to force people to migrate to the new Numpy. Bests. jose. Bruce Sherwood escribió: > I don't understand. The VPython installer VPython-Win-Py2.5-3.2.10.exe > for Python 2.5 available at vpython.org includes Numeric. This installer > was made last fall to get around precisely the problem you describe, the > lack of a separately available Numeric. I just verified that this works > as intended, though admittedly with Python 2.5 which I happen to have on > my computer, not Python 2.5.1 (but I would be shocked if that made a > difference). > > If you look in c:\Python25\Lib\site-packages you should see a folder for > Numeric as well as a folder for visual. > > I would suggest using the Add/remove control panel to remove VPython and > re-install it, though I don't know why that should be necessary nor why > it should help the situation. > > Has anyone else had a related experience? > > Incidentally, one of the big contributions made by the late Arthur > Siegel was to change Visual to use numpy instead of Numeric in the beta > version of Visual. > > Bruce > > José Antonio Martín H wrote: > >> Hi all, As I suspected, finally we have a complete disorder. >> >> If you get a new computer using win32. >> >> Install Python 2.5.1 >> Install vpython, >> vpython does not work because there is no Numeric module installed. >> >> If you go to the page of Numeric Numpy, you see that all versions of the >> old Numeric for python 2.5 where deleted and there is no version of the >> old Numeric for Python 2.5 >> >> So, you must install the New Numeric wich is Numpy. >> But it seems that vpython does not work with this version. >> >> The unique option is to use numarray, but numarray has been discontinued >> an will no longer be mainained an updated. >> >> So, should we do ? >> >> regards. >> >> > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > -- ==================================================== Jose Antonio Martin H. Departamento de Sistemas Informáticos y Computación Facultad de Informática Universidad Complutense de Madrid Ciudad universitaria, 28040 Madrid ==================================================== |
From: Bruce S. <Bru...@nc...> - 2007-05-22 15:19:22
|
I don't understand. The VPython installer VPython-Win-Py2.5-3.2.10.exe for Python 2.5 available at vpython.org includes Numeric. This installer was made last fall to get around precisely the problem you describe, the lack of a separately available Numeric. I just verified that this works as intended, though admittedly with Python 2.5 which I happen to have on my computer, not Python 2.5.1 (but I would be shocked if that made a difference). If you look in c:\Python25\Lib\site-packages you should see a folder for Numeric as well as a folder for visual. I would suggest using the Add/remove control panel to remove VPython and re-install it, though I don't know why that should be necessary nor why it should help the situation. Has anyone else had a related experience? Incidentally, one of the big contributions made by the late Arthur Siegel was to change Visual to use numpy instead of Numeric in the beta version of Visual. Bruce José Antonio Martín H wrote: > Hi all, As I suspected, finally we have a complete disorder. > > If you get a new computer using win32. > > Install Python 2.5.1 > Install vpython, > vpython does not work because there is no Numeric module installed. > > If you go to the page of Numeric Numpy, you see that all versions of the > old Numeric for python 2.5 where deleted and there is no version of the > old Numeric for Python 2.5 > > So, you must install the New Numeric wich is Numpy. > But it seems that vpython does not work with this version. > > The unique option is to use numarray, but numarray has been discontinued > an will no longer be mainained an updated. > > So, should we do ? > > regards. > |
From: <jam...@fd...> - 2007-05-22 10:11:32
|
Hi all, As I suspected, finally we have a complete disorder. If you get a new computer using win32. Install Python 2.5.1 Install vpython, vpython does not work because there is no Numeric module installed. If you go to the page of Numeric Numpy, you see that all versions of the old Numeric for python 2.5 where deleted and there is no version of the old Numeric for Python 2.5 So, you must install the New Numeric wich is Numpy. But it seems that vpython does not work with this version. The unique option is to use numarray, but numarray has been discontinued an will no longer be mainained an updated. So, should we do ? regards. -- ==================================================== Jose Antonio Martin H. Departamento de Sistemas Informáticos y Computación Facultad de Informática Universidad Complutense de Madrid Ciudad universitaria, 28040 Madrid ==================================================== |
From: Ruth C. <rwc...@un...> - 2007-05-11 14:37:20
|
There are two upcoming meetings, one with an associated theme issue of the American Journal of Physics, that are of particular interest to anyone involved in computational physics. All of these provide an opportunity to share the work you've been doing with VPython and to contribute to the development of the computational component of the undergraduate physics curriculum. Please consider attending / contributing! 1) You are invited to attend a Topical Workshop on Computational Physics for Upper Level Courses in conjunction with the 2007 AAPT Summer Meeting in Greensboro NC. The workshop will be held from Friday July 27 through Saturday July 28. The workshop is described at http://www.opensourcephysics.org/CPC/ The conference fee of $40 can be paid when registering for the Summer Meeting on the AAPT website. Instructors who wish to attend the Topical Workshop without attending the national meeting should contact Wolfgang Christian for registration details: woc...@da... AAPT Topical Workshop on Computational Physics for Upper Level Courses Davidson College, Davidson, NC July 27-28, 2007 The purpose of this conference is to identify problems where computation helps students understand key physics concepts. Participants are university and college faculty interested in integrating computation at their home institutions. Some participants already teach or have taught computational physics to undergraduates and some are looking for ways to integrate computational physics into their existing physics curriculum. Please visit the Computational Physics Topical Conference website for additional information. http://www.opensourcephysics.org/CPC/ 2) The American Journal of Physics seeks contributed manuscripts for a special theme issue on "Computation and Computer-Based Instruction," to be published in early 2008. The purpose of this issue is to promote innovation in all aspects and at all levels of teaching with computers including the integration of computational physics research into teaching. The article deadline is late summer 2007. Additional information can be found at: http://www.opensourcephysics.org/GRC/#ajp 3) In summer of 2008 the Gordon Research Conference on Physics Research and Education will focus on computational physics. More details on this conference will be available later. ------------------------------- Ruth Chabay Professor of Physics North Carolina State University Raleigh NC 27695-8202 office: 506C Cox Hall email: Rut...@nc... phone: 919.513.4826 |
From: Jennifer A. <je...@gm...> - 2007-05-10 05:50:05
|
Hello-- I'm using vPython to animate some data... I'm adding a feature which allows the user to step forward and back in time frame by frame, and when the user "rewinds," I want to delete part of the trail the object left (I don't want to make the whole trail invisible, just part of it). To add to the trail, it's just trailName.append(whatever)... does anyone know if there is a trailName.pop() or trailName.remove() or something like that would allow me to unappend data points from a curve object? Thank you! Jennifer Anttonen Harvard University je...@gm... |