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...> - 2008-11-20 18:38:13
|
For the upcoming Visual 5 on Vista (and probably on XP), scene.mouse.camera does have a value immediately even though the mouse is outside the window; it is the upper left corner of the window. Is that what you were looking for? The sourceforge bug and features tracking has not been used much for various reasons. However, with the upcoming release of Visual 5 it might make sense to make use of it. I have to say that creating or extending a feature request list doesn't have much point at the moment, as all hands are more than full just trying to release Visual 5, and the hands and heads of users will be full just trying out the new environment. Bruce Sherwood Anders Petersson wrote: > Hello > I have a bug report. > With Visual 4 beta 26 under Windows XP, scene.mouse.camera is not > initialized until the mouse pointer enters the scene. > I need that variable right away since I determine the visibility of box > "walls" based on camera position, to avoid hiding objects inside the box. > > The bug tracking system at http://sourceforge.net/projects/visualpython/ > seem to be very lightly used. Is this a good system to maintain? > In such case, now might be a good idea to revise the list, with the > upcoming Visual 5 and all. > > Also, the feature request list would need an overhaul if you deem it > worthwhile to have. > I certainly would be interested. > > Regards > /Anders |
From: Anders P. <an...@gm...> - 2008-11-20 17:12:00
|
Hello I have a bug report. With Visual 4 beta 26 under Windows XP, scene.mouse.camera is not initialized until the mouse pointer enters the scene. I need that variable right away since I determine the visibility of box "walls" based on camera position, to avoid hiding objects inside the box. The bug tracking system at http://sourceforge.net/projects/visualpython/seem to be very lightly used. Is this a good system to maintain? In such case, now might be a good idea to revise the list, with the upcoming Visual 5 and all. Also, the feature request list would need an overhaul if you deem it worthwhile to have. I certainly would be interested. Regards /Anders |
From: Bruce S. <Bru...@nc...> - 2008-11-20 02:56:37
|
Take the average of the two points to get the position: a = vector(-1,0,0) b = vector(1,0,0) y = vector(0,2,0) cylinder(pos=a+y, axis=b-a) box(pos=(a+b)/2, axis=b-a) Doug Mair wrote: > When using a box in VPython, pos specifies the center of the entire box. > > I'm trying to draw a box given two points. > > This works for Cylinder, but not box: > > cylinder(pos=point1, axis=point2-point1) > box(pos=point1, axis=point2-point1) > > How do I get the box to match the cylinder? > > Thanks, > -Doug > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Doug M. <dou...@gm...> - 2008-11-20 01:25:43
|
When using a box in VPython, pos specifies the center of the entire box. I'm trying to draw a box given two points. This works for Cylinder, but not box: cylinder(pos=point1, axis=point2-point1) box(pos=point1, axis=point2-point1) How do I get the box to match the cylinder? Thanks, -Doug |
From: Bruce S. <Bru...@nc...> - 2008-11-19 23:34:11
|
It's a subtle geometry issue having to do with a discontinuity at the scene.up direction. I confess I've never fully wrapped my head around the problem. It's more a feature than a bug, in that I don't know a way around this within the Visual framework, and it's not getting "fixed" even in Visual 5 (about to be released). Bruce rsa...@mt... wrote: > On Windows XP SP3 (Python 2.5.1, VPython 3.2.11), the following use of > frame() gives an unexpected flip in the y- and z-axes in some of the > frames. > > By uncommenting the line: > if costh<0: Fup=-Fup > I get the desired behavior. > > Is this a bug? > > Rob Salgado > > > # example of frame() > > from visual import * > > scene.background=(.5,.5,.5) > scene.forward=(0,20,-10) > > DEG=math.pi/180. > F=[] > > for th in arange(0,360*DEG, 30*DEG): > costh=cos(th) > sinth=sin(th) > > Fup=scene.up > #if costh<0: Fup=-Fup > > F.append(frame(pos=6*norm( vector(costh, sinth, 0) ), > axis=vector(costh,sinth,0) , up=Fup)) > > arrow(frame=F[-1],color=color.red, axis=vector(1,0,0) ) > arrow(frame=F[-1],color=color.green, axis=vector(0,1,0) ) > arrow(frame=F[-1],color=color.blue, axis=vector(0,0,1) ) > label(frame=F[-1],text="%3d" % round(th/DEG) ,box=0, opacity=0) > > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: <rsa...@mt...> - 2008-11-19 16:13:10
|
On Windows XP SP3 (Python 2.5.1, VPython 3.2.11), the following use of frame() gives an unexpected flip in the y- and z-axes in some of the frames. By uncommenting the line: if costh<0: Fup=-Fup I get the desired behavior. Is this a bug? Rob Salgado # example of frame() from visual import * scene.background=(.5,.5,.5) scene.forward=(0,20,-10) DEG=math.pi/180. F=[] for th in arange(0,360*DEG, 30*DEG): costh=cos(th) sinth=sin(th) Fup=scene.up #if costh<0: Fup=-Fup F.append(frame(pos=6*norm( vector(costh, sinth, 0) ), axis=vector(costh,sinth,0) , up=Fup)) arrow(frame=F[-1],color=color.red, axis=vector(1,0,0) ) arrow(frame=F[-1],color=color.green, axis=vector(0,1,0) ) arrow(frame=F[-1],color=color.blue, axis=vector(0,0,1) ) label(frame=F[-1],text="%3d" % round(th/DEG) ,box=0, opacity=0) ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program. |
From: Bruce S. <Bru...@nc...> - 2008-11-18 00:13:14
|
There are some issues with boxes in Visual 4. But it's irrelevant, because Visual 5 is different in this area with its emphasis on material properties; there is no shininess attribute. The last large known problem in Visual 5 (poor performance on Linux) was fixed today. The remaining list of known bugs is now very short, and I think a release of Visual 5 is imminent. We're calling the upcoming release "5" instead of "4" to emphasize that 4 never made it out of beta, and as previously announced the new version has some syntax that is incompatible with 4. Bruce Sherwood Anders Petersson wrote: > Hello, > I must have missed something simple here, because these two boxes look > identical to me: > >> >> from visual import * >> >> a = box(pos=(0,0,0), color=(0.3,0.3,0.3)) >> >> b = box(pos=(2,0,0), color=(0.3,0.3,0.3), shininess=0) > > Actually texture_and_lighting.py also shows shiniess for the boxes with > "shininess=0" so maybe it isn't just me after all. > Might the grim truth be that shininess is not changable for boxes? > Setting "lit" works, but this looks pretty dull. > > Regards > /Anders |
From: Anders P. <an...@gm...> - 2008-11-17 23:53:07
|
Hello, I must have missed something simple here, because these two boxes look identical to me: >>> from visual import * >>> a = box(pos=(0,0,0), color=(0.3,0.3,0.3)) >>> b = box(pos=(2,0,0), color=(0.3,0.3,0.3), shininess=0) Actually texture_and_lighting.py also shows shiniess for the boxes with "shininess=0" so maybe it isn't just me after all. Might the grim truth be that shininess is not changable for boxes? Setting "lit" works, but this looks pretty dull. Regards /Anders |
From: Bruce S. <Bru...@nc...> - 2008-11-12 00:39:03
|
See the "faces" object for low-level manipulations of the kind you describe. And as you say, in some cases you might choose to subclass an object. Bruce Sherwood Mr. T wrote: > I know VPython is made to be very high level...which is great...but is > there anyway i could make calls to do stuff like... > > 1. manipulate the individual verticies of an object. > 2. change the axis of an object...i.e. to the corner, instead of the center > 3. change the color of individual faces. > > maybe by sub classing of vpython functions??? > |
From: Mr. T <rt...@gm...> - 2008-11-11 22:40:44
|
I know VPython is made to be very high level...which is great...but is there anyway i could make calls to do stuff like... 1. manipulate the individual verticies of an object. 2. change the axis of an object...i.e. to the corner, instead of the center 3. change the color of individual faces. maybe by sub classing of vpython functions??? |
From: Stef M. <s.m...@ru...> - 2008-11-11 21:16:16
|
rt...@gm... wrote: > is it possible to "pack" the vpython display inside a Tkinter GUI window? > if so, how would i do this? > note: i know how to use Tkinter, so all i need to know is how to get a > handle to > vpython display window. I guess it goes identical as in wxPython, look here: http://mientki.ruhosting.nl/data_www/pylab_works/pw_vpython_docking.html a demo can be found here http://code.google.com/p/pylab-works/downloads/list cheers, Stef > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ------------------------------------------------------------------------ > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: <rt...@gm...> - 2008-11-11 20:44:58
|
is it possible to "pack" the vpython display inside a Tkinter GUI window?if so, how would i do this? note: i know how to use Tkinter, so all i need to know is how to get a handle to vpython display window. |
From: Anders P. <an...@gm...> - 2008-11-06 23:19:46
|
Nice to see that the bugs are already addressed. Though I don't see why "pickle.dump(scene.forward, file)" shouldn't work. scene.forward looks like a normal vector. This is not such an important feature, of course. I would be more happy to be able to set the zoom level programmatically. I briefly tried to reproduce the "box.height = 3" issue but didn't see the problem again. The effect I got before was that all boxes took on the same height. Maybe the effect had other, natural causes... Regards /Anders On Mon, Nov 3, 2008 at 11:33 PM, Bruce Sherwood <Bru...@nc...> wrote: > These bugs are gone from the Visual 5.0 about to be released. More below. > > Anders Petersson wrote: >> >> David's mail had me remember the problems I've encountered myself. >> Here's the list of issues in beta 4.beta26. >> Please don't take it as critique, I really like the new features! Just >> some small things to sort out. >> >> >> Converting from a color to vector no longer works: >> vector(sphere().color) > > This works in Visual 5.0. >> >> Traceback (most recent call last): >> File "<pyshell#25>", line 1, in <module> >> vector(a.color) >> ArgumentError: Python argument types in >> vector.__init__(vector, tuple) >> did not match C++ signature: >> __init__(_object*, cvisual::vector) >> __init__(_object*) >> __init__(_object*, double) >> __init__(_object*, double, double) >> __init__(_object*, double, double, double) >> (I did this to interpolate transitions between two colors) >> >> >> It is illegal to slice a vector?! >> >>>>> from visual import vector >>>>> a = vector(1,2,3) >>>>> a[:2] > > This works in Visual 5.0. >> >> Traceback (most recent call last): >> File "<pyshell#14>", line 1, in <module> >> a[:2] >> ArgumentError: Python argument types in >> vector.__getitem__(vector, slice) >> did not match C++ signature: >> __getitem__(cvisual::vector {lvalue}, int) >> >> >> >> Doesn't work: >> pickle.dump(scene.forward, file) > > This doesn't work but never has. Doesn't work in Visual 3 nor in Visual 5.0. >> >> pickle.dump(vector(scene.forward), output) >> File "C:\Python25\lib\pickle.py", line 1362, in dump >> Pickler(file, protocol).dump(obj) >> File "C:\Python25\lib\pickle.py", line 224, in dump >> self.save(obj) >> File "C:\Python25\lib\pickle.py", line 331, in save >> self.save_reduce(obj=obj, *rv) >> File "C:\Python25\lib\pickle.py", line 401, in save_reduce >> save(args) >> File "C:\Python25\lib\pickle.py", line 286, in save >> f(self, obj) # Call unbound method with explicit self >> File "C:\Python25\lib\pickle.py", line 562, in save_tuple >> save(element) >> File "C:\Python25\lib\pickle.py", line 295, in save >> self.save_global(obj) >> File "C:\Python25\lib\pickle.py", line 748, in save_global >> (obj, module, name)) >> PicklingError: Can't pickle <type 'Boost.Python.instance'>: it's not >> found as Boost.Python.instance >> >> >> >> I accidently did >> box.height = 3 >> instead of object.box.height = 3 >> with very curious effects. Should it be possible to set dimensions for >> all objects in this way? > > What are the "curious effects"? I too am puzzled about this syntax. >> >> >> /Anders Petersson >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |
From: Poul R. <Pou...@sk...> - 2008-11-05 13:08:57
|
I just triedRodney Dunning 's n-body simulation (http://www.longwood.edu/staff/dunningrb/vpnbody/). When I doubleclick vpnb.py I'm asked to type a file name. I type for instance InnerPlanets.txt and the program displays a screen for a millisecond or so and then comes with the following error message: Program: C:\Pyton25\python.exe File: ../../vpython-core2/src/gtk2/render_surface.cpp Line 361 Expression: get_gl_window()->gl_begin(get_gl_context()) For information on how your program can cause an assertion failure, see the Visual C++ documentation on asserts. How can I make it run? Poul Riis |
From: k r. <kro...@gm...> - 2008-11-04 13:53:50
|
Hello, I am an engineering student and extremely new to VPython. I have the project of building a GUI for VPython and demonstrate its usage as a tool for data structures demonstration. So I am planning to provide buttons which will help the user select the basic VPython shapes.The buttons will allow the user to select, drag and drop the objects on the space provided. There will be a seperate space for editing the properties of the shape. As my main purpose is to explore the usage of VPython as a tool for data structure demonstration, I also need to provide certain simple commands which can help a teacher, who knows the pseudocode of any data structure property he wants to demonstrate, to generate the code, without knowing the Python syntax for the same. Since I need to automatically generate VPython in the background, so it will serve as the backend of the project. For GUI building, I am using PyQt and Qt designer. I would like you all to give your ideas and suggestions as the main problem which am facing is thinking of the commands which can help a person to code VPython programs with the help of GUI itself and maybe some extremely simple commands. Hoping to be helped; thanks in advance. -kr0y. -- ~ Once you have flown, you will walk the earth with your eyes turned skyward, for there you have been, there you long to return --Da Vinci |
From: Stef M. <s.m...@ru...> - 2008-11-04 10:15:28
|
hello, thanks to the wonderful help of this list I succeeded in docking VPython in wxPython. I only solved the problem for MS-Windows, as I don't know anything about Linux / Mac. My notes can be found here http://mientki.ruhosting.nl/data_www/pylab_works/pw_vpython_docking.html (as this site regular moves, it can always be found through the redirector http://pic.flappie.nl somewhere under the paragraph "PyLab_works" with the title "VPython Docking") A demo program can be found here: http://code.google.com/p/pylab-works/downloads/list cheers, Stef Mientki Het UMC St Radboud staat geregistreerd bij de Kamer van Koophandel in het handelsregister onder nummer 41055629. The Radboud University Nijmegen Medical Centre is listed in the Commercial Register of the Chamber of Commerce under file number 41055629. |
From: Bruce S. <Bru...@nc...> - 2008-11-03 22:33:50
|
These bugs are gone from the Visual 5.0 about to be released. More below. Anders Petersson wrote: > David's mail had me remember the problems I've encountered myself. > Here's the list of issues in beta 4.beta26. > Please don't take it as critique, I really like the new features! Just > some small things to sort out. > > > Converting from a color to vector no longer works: > vector(sphere().color) This works in Visual 5.0. > > Traceback (most recent call last): > File "<pyshell#25>", line 1, in <module> > vector(a.color) > ArgumentError: Python argument types in > vector.__init__(vector, tuple) > did not match C++ signature: > __init__(_object*, cvisual::vector) > __init__(_object*) > __init__(_object*, double) > __init__(_object*, double, double) > __init__(_object*, double, double, double) > (I did this to interpolate transitions between two colors) > > > It is illegal to slice a vector?! > >>>> from visual import vector >>>> a = vector(1,2,3) >>>> a[:2] This works in Visual 5.0. > > Traceback (most recent call last): > File "<pyshell#14>", line 1, in <module> > a[:2] > ArgumentError: Python argument types in > vector.__getitem__(vector, slice) > did not match C++ signature: > __getitem__(cvisual::vector {lvalue}, int) > > > > Doesn't work: > pickle.dump(scene.forward, file) This doesn't work but never has. Doesn't work in Visual 3 nor in Visual 5.0. > > pickle.dump(vector(scene.forward), output) > File "C:\Python25\lib\pickle.py", line 1362, in dump > Pickler(file, protocol).dump(obj) > File "C:\Python25\lib\pickle.py", line 224, in dump > self.save(obj) > File "C:\Python25\lib\pickle.py", line 331, in save > self.save_reduce(obj=obj, *rv) > File "C:\Python25\lib\pickle.py", line 401, in save_reduce > save(args) > File "C:\Python25\lib\pickle.py", line 286, in save > f(self, obj) # Call unbound method with explicit self > File "C:\Python25\lib\pickle.py", line 562, in save_tuple > save(element) > File "C:\Python25\lib\pickle.py", line 295, in save > self.save_global(obj) > File "C:\Python25\lib\pickle.py", line 748, in save_global > (obj, module, name)) > PicklingError: Can't pickle <type 'Boost.Python.instance'>: it's not > found as Boost.Python.instance > > > > I accidently did > box.height = 3 > instead of object.box.height = 3 > with very curious effects. Should it be possible to set dimensions for > all objects in this way? What are the "curious effects"? I too am puzzled about this syntax. > > > /Anders Petersson > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Anders P. <an...@gm...> - 2008-11-03 21:12:40
|
David's mail had me remember the problems I've encountered myself. Here's the list of issues in beta 4.beta26. Please don't take it as critique, I really like the new features! Just some small things to sort out. Converting from a color to vector no longer works: vector(sphere().color) Traceback (most recent call last): File "<pyshell#25>", line 1, in <module> vector(a.color) ArgumentError: Python argument types in vector.__init__(vector, tuple) did not match C++ signature: __init__(_object*, cvisual::vector) __init__(_object*) __init__(_object*, double) __init__(_object*, double, double) __init__(_object*, double, double, double) (I did this to interpolate transitions between two colors) It is illegal to slice a vector?! >>> from visual import vector >>> a = vector(1,2,3) >>> a[:2] Traceback (most recent call last): File "<pyshell#14>", line 1, in <module> a[:2] ArgumentError: Python argument types in vector.__getitem__(vector, slice) did not match C++ signature: __getitem__(cvisual::vector {lvalue}, int) Doesn't work: pickle.dump(scene.forward, file) pickle.dump(vector(scene.forward), output) File "C:\Python25\lib\pickle.py", line 1362, in dump Pickler(file, protocol).dump(obj) File "C:\Python25\lib\pickle.py", line 224, in dump self.save(obj) File "C:\Python25\lib\pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "C:\Python25\lib\pickle.py", line 401, in save_reduce save(args) File "C:\Python25\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "C:\Python25\lib\pickle.py", line 562, in save_tuple save(element) File "C:\Python25\lib\pickle.py", line 295, in save self.save_global(obj) File "C:\Python25\lib\pickle.py", line 748, in save_global (obj, module, name)) PicklingError: Can't pickle <type 'Boost.Python.instance'>: it's not found as Boost.Python.instance I accidently did box.height = 3 instead of object.box.height = 3 with very curious effects. Should it be possible to set dimensions for all objects in this way? /Anders Petersson |
From: Anders P. <an...@gm...> - 2008-11-03 21:03:53
|
I'm not the one to authoritatively answer this, but I can guess... I agree that the behaviour is inconsistent. I guess VPython could reference the new vector instead of copying the contents to the previous vector. The downside would be: b = vector(0,0,0) a.pos = b b.x = 3 This would change the value of a.pos but vpython wouldn't know to update the graphics (without some tricks). Otherwise "a.pos = b" could make a copy of b but that wouldn't be consistent with normal assignment either. Or if "b = a.pos" would make a copy, but there are still problems. I've kinda experienced the problem but didn't identify the exact reason as you did (thanks). You can get around the problem by making a copy: b = vector(a.pos) I guess you want a copy rather than an alias anyway, because even with normal sematics: a.poo = vector(0,0,0) b = a.poo b.x = 4 print a.poo # ==> (4, 0, 0) I don't see any good solutions other than avoiding to use references/aliases to vectors. Regards /Anders Petersson On Mon, Nov 3, 2008 at 9:38 PM, David Roundy <ro...@ph...> wrote: > Hello, > > I've been playing with vpython for a course I'll be teaching this > winter, and have run into what seem to be broken semantics, which I'm > afraid will confuse the heck out of my students (as it confused the > heck out of me). Try to predict the outcome of the following program > (run interactively, so you can see the value of b): > > from visual import * > a = sphere() > > a.pos = vector(0,0,0) > b = a.pos > a.pos = vector(1,1,1) > b > > a.poo = vector(0,0,0) > b = a.poo > a.poo = vector(1,1,1) > b > > The result differs depending on whether we are dealing with a.poo or > a.pos. a.poo behaves like native python while a.pos behaves in a very > confusing manner. I hope this you consider this a bug! Is there any > hope to get it fixed soon? Also, does anyone have an idea how to > explain the assignment semantics to me? > > I spent a few months hating python semantics until finally I > discovered that python is fine, it's vpython that's buggy. My current > plan is to advise students never to put native vpython data members on > the right hand of an = sign, since that's the only way I know of to > avoid extreme frustration. Is there another approach that could work? > It'd be much more elegant to actually use those data members as if > they were real vectors, but I don't want to lead students into the > land of extremely-confusing bugs. The idea of teaching in python was > to avoid weird pointer aliasing bugs, not to make them harder to track > down... > > David > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: David R. <ro...@ph...> - 2008-11-03 20:38:59
|
Hello, I've been playing with vpython for a course I'll be teaching this winter, and have run into what seem to be broken semantics, which I'm afraid will confuse the heck out of my students (as it confused the heck out of me). Try to predict the outcome of the following program (run interactively, so you can see the value of b): from visual import * a = sphere() a.pos = vector(0,0,0) b = a.pos a.pos = vector(1,1,1) b a.poo = vector(0,0,0) b = a.poo a.poo = vector(1,1,1) b The result differs depending on whether we are dealing with a.poo or a.pos. a.poo behaves like native python while a.pos behaves in a very confusing manner. I hope this you consider this a bug! Is there any hope to get it fixed soon? Also, does anyone have an idea how to explain the assignment semantics to me? I spent a few months hating python semantics until finally I discovered that python is fine, it's vpython that's buggy. My current plan is to advise students never to put native vpython data members on the right hand of an = sign, since that's the only way I know of to avoid extreme frustration. Is there another approach that could work? It'd be much more elegant to actually use those data members as if they were real vectors, but I don't want to lead students into the land of extremely-confusing bugs. The idea of teaching in python was to avoid weird pointer aliasing bugs, not to make them harder to track down... David |
From: Stef M. <s.m...@ru...> - 2008-11-03 19:30:32
|
Bruce Sherwood wrote: > Make the window invisible, change its properties, then make it visible > again. thanks Bruce > This ought to be in the documentation. But isn't :-( More strange (at least from my view) things happens (or better don't happen) when resizing, I'll write them down and report it back to this group in the next couple of days. cheers, Stef > > Bruce Sherwood > > Stef Mientki wrote: >> hello, >> >> is it possible to position / resize the scene window after creating >> the window? >> > > |
From: Aaron M. <ajm...@al...> - 2008-11-03 02:44:42
|
Thanks to Anders and Bruce for checking my VPython stuff so quickly. I have repaired a miss-pointed link to the Franck-Hertz simulation. (Also, yes, the .py files end in .py.txt. Just save them as .py files. Our web server wants to run my python code instead of allowing you to download it and I haven't figured out the proper way to fix this yet). Thanks, again, for your interest and support of VPython. Sincerely, Aaron Miller ------------------------------------------------------ Aaron J. Miller, Ph.D. Department of Physics 328 Palenske Hall Albion College, Albion, MI 49224 ajm...@al... 517-629-0684 phone 517-629-0264 fax On Sat, Nov 1, 2008 at 4:17 PM, Aaron Miller <ajm...@al...> wrote: > Hello Folks, > > I have enjoyed learning VPython as I teach through Bruce's book for the > first time this semester. I have put a few VPython files up on our webspace > here: http://www.albion.edu/physics/ajmiller/VPython/ > > In particular you might like to play with the Franck-Hertz simulation. You > get to use a slider to adjust the acceleration voltage and "see" the > excitation of the gas medium. > > Thanks to everyone who uses and improves VPython. It has been a great tool > this semester so far. > > Sincerely, > Aaron Miller > > ------------------------------------------------------ > Aaron J. Miller, Ph.D. > Department of Physics > 328 Palenske Hall > Albion College, Albion, MI 49224 > > ajm...@al... > 517-629-0684 phone > 517-629-0264 fax > > > |
From: Bruce S. <Bru...@nc...> - 2008-11-02 19:43:05
|
Make the window invisible, change its properties, then make it visible again. This ought to be in the documentation. Bruce Sherwood Stef Mientki wrote: > hello, > > is it possible to position / resize the scene window after creating the > window? > |
From: Stef M. <s.m...@ru...> - 2008-11-02 18:24:17
|
hi Jasper, Jasper Stolte wrote: > Yup, TU/e here. Everything ok in Nijmegen? Yes, everything is fine overhere. > > Anyway, thanks for the info on the time testing. It's a simple yet > efficient method to see what is going on in there. Doesn't printing > things make it slow though? I doubt so, if can print a line every 5 msec and consume 20% of my processor time, while a Vpython application is running ... > > You are right that the current random thing acts as noise (quite big > noise though). I'll make different sliders/options for the > disturbances/physical parameters etcetera later on. Also, I'll put in > different types of controller, rewrite some stuff etc etc.. Lots to be > done, in due time. It might me interesting to combine your control systems theory knowledge, with mine PyLab_Works. btw. I've played around with docking VPython in a wxPython application, and although I've some quirks to solve, it's working in it's basic form (windows only :-( . I'll let you know when it's working completely. cheers, Stef |
From: Jasper S. <jas...@gm...> - 2008-11-02 14:14:11
|
Yup, TU/e here. Everything ok in Nijmegen? Anyway, thanks for the info on the time testing. It's a simple yet efficient method to see what is going on in there. Doesn't printing things make it slow though? You are right that the current random thing acts as noise (quite big noise though). I'll make different sliders/options for the disturbances/physical parameters etcetera later on. Also, I'll put in different types of controller, rewrite some stuff etc etc.. Lots to be done, in due time. The controller is running at a faster rate because this simple ODE solver gives too large errors when the timesteps become larger than 0.01s. So I split the visual framerate from the simulation timestep. Greetz, Jasper On Sat, Nov 1, 2008 at 9:26 PM, Stef Mientki <s.m...@ru...> wrote: > hi Jasper, > > TUE ? > > Jasper Stolte wrote: > > Hi Stef, > > > > > > Now an interesting extension of your program would be to introduce a > > disturbance, > > simply by pressing a button, > > but even nicer by shaking the VPython window ;-) > > > > We just ran it on another computer windows/linux: > > Fedora 9.0, 200 fps ==> 50% processor time (dual core) , > > winXP-SP2, 200 fps ==> processor use 20% (time between frames > > 0,0,0,15, > > , so indeed an average of 5 msec) > > > > > > Indeed, I was thinking of reading the acceleration sensor of my > > notebook and using that to generate a disturbance in the simulation. > > Didn't get around to that though, so now it just has a random > disturbance. > Perfect, but please also add a button, for those who don't have such a > notebook. > I thought you added the random, just as a small noise signal. It would > be nice to give it big sweeper, after it has reached is equilibrium. > BTW, why do you run your control machine on a higher frequency than the > framerate ? > > > > Nice to see it runs elsewhere without too much trouble. Quite strange > > that the processor load varies, as since I use a fixed time step ODE > > solver, the calculations are identical each timestep. I'm interested > > to find out how you know the timing between frames. How do you know it > > was at 0,0,0,15 ms? > just a simple print statement: > import time > self.ABS_TIME = time.time() > > def update(self, evt=None): > #for n in range(10): > for n in range(int(ceil(fs/fps))): > self.controller.input = -self.pendulum.output() + .05*rand(2,1) > self.pendulum.input = self.controller.output() + 1*rand() > > self.controller.timestep(1/fs) > self.pendulum.timestep(1/fs) > > self.visualization.update() > print ( int ( 1000 * ( time.time() - self.ABS_TIME ) ) ) > self.ABS_TIME = time.time() > > I also tried to remove the wx.Timer, and binded the update method to the > idle event, > then testing the elapsed time to decide if the calculations should be > done or not. > The effects are the same: steps of 15 msec :-( > Another option would be to implement your own main GUI-loop. > > cheers, > Stef > > > > Greetz, > > Jasper > > ------------------------------------------------------------------------ > > > > ------------------------------------------------------------------------- > > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > > Build the coolest Linux based applications with Moblin SDK & win great > prizes > > Grand prize is a trip for two to an Open Source event anywhere in the > world > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Visualpython-users mailing list > > Vis...@li... > > https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |