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: Stef M. <s.m...@ru...> - 2008-11-02 13:43:35
|
hello, is it possible to position / resize the scene window after creating the window? It's possible with the mouse, but when I try to do it from code, I get some error message: "RuntimeError: Window attributes are not accessible once the window has been created." If it's not possible, is there an easy way to recreate the window, by copying the current state to a new one window (which can be given the new size /position), and destroying the old one ? And maybe I'm going totally the wrong way in achieving my goal: dock (or semi-dock) the scene window in another application . So maybe there are better suggestions. For windows only, I can think of a trick by using a window with a hole in combination with AutoIt, but besides that this is one big trick, it certainly doesn't work on other OS's. thanks, Stef Mientki |
From: Stef M. <s.m...@ru...> - 2008-11-01 22:25:11
|
thanks Aaron, for making these nice examples. Your download links are not completely accurate: all links gives the extension .py.txt Frank_Hertz experiment: the text under the picture has the wrong linke: http://www.albion.edu/physics/ajmiller/VPython/HydrogenIonSim.py.txt I would love to see more examples, especially the Rob Salgado's special relativity demos, does anyone know where I can find the sources ? cheers, Stef Aaron Miller 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... <mailto:ajm...@al...> > 517-629-0684 phone > 517-629-0264 fax > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > 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: Aaron M. <ajm...@al...> - 2008-11-01 21:17:26
|
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: Stef M. <s.m...@ru...> - 2008-11-01 20:26:35
|
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 > |
From: Jasper S. <jas...@gm...> - 2008-11-01 19:23:45
|
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. 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? Greetz, Jasper |
From: Stef M. <s.m...@ru...> - 2008-10-31 21:05:15
|
hi Jasper, Jasper Stolte wrote: > Hi all, > > After very little effort I got them working together a few weeks ago > in my pendulum simulator, which can be downloaded from google code.. I > wanted to post the result to the wx-python list when it is a bit more > mature, as it's not quite finished yet. Anyway, run src/main.py, > screenshot attached. It's got a wxPython part which shows a slider > with which you can influence the pendulum length. Under Linux, this is > a real-time simulation, but under Windows I guess smth is messed up > with the wx.Timer so it is very slow. I tested under winXP-SP2 and it's not slow, but it's not fluently. The wx.Timer has a 15 msec resolution, your demo wants 20 msec, so when you print the elapsed time, you get 15 or 30 mseconds, with probably an average of 20 msec ? Also interesting to know that the processor loads varies a lot, between less than 1% upto 15% (dual core). On the same machine I have Ubuntu in Virtualbox installed. It's funny to see that in Windows/Virtual box/Ubuntu it runs fluently, time varies between 18 .. 22 msec. So I'm very satisfied about the Virtualbox. So the machine is not the problem, but indeed the implementation of wx.Timer under windows. I'll post a question on the wxPython list if it's possible to replace the timer by a high-resolution timer ( I won't mention your application yet ;-), I also need it for 2D simulation. I'm not familiar with VPython, but I guess you can set the antialiazing of the graphics card in there. I did set it manual on my graphics card and it looks much more beautiful. 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) So indeed it's very well possible to make nice applications with wxPython + VPython. thanks very much, cheers, Stef > > >> svn checkout */http > <http://pendulum-cart.googlecode.com/svn/trunk/>/*://pendulum-cart.googlecode.com/svn/trunk/ > > Anyway, the solution really was as simple as mentioned here. You can > just import visual and create a scene. This scene will then be > displayed in a separate window. As long as you keep track of the > visual object in the wxPython framework, you can manipulate it any way > you like from the wxPython program. > > Even nicer would be if somehow the OpenGL canvas would be available in > Python visual object, so you could really draw it to a wxPython > window. Now there's that extra GTK frame hanging around with the 3D > rendering. Not that this is a big issue or anything. Just something to > put on the wishlist for when the important things are already working.. ;) > > Greetz, > Jasper > > > > On Fri, Oct 31, 2008 at 1:36 AM, Stef Mientki <s.m...@ru... > <mailto:s.m...@ru...>> wrote: > > Jose, Bruce, > > thanks for your answers.... > > Jose Antonio Martin H wrote: > > Hi , > > > >> This doesn't seem to be possible at first sight, because both > >> environments claim the main loop > >> > > > > Vpython does not claim a main loop. > > > > You can simply create the scene, the objects, etc... > > > > And have your Wxpython program running, vpython will continue > executing and > > you can change the objects of vpython from whithin your App > directly. > > > That sounds really simple. > I've to admit, that I never investigated the possibilities, > because on the wxPython list, this is the usual answer: > > "Both wxpython and vpython are great tools, which I'd love to use > together for my program. The problem is they each run their own event > loop. Now almighty Google taught me there were some ancient threads on > the topic stating it would be very hard to combine the two." > > If I've some more time I'll certainly will try it. > > btw, does anyone has a (working) example of wxPython + VPython ? > > thanks again, > Stef Mientki > > > Also, you can indeed control the speed at wich the vpython do > what it to > > with the rate() comand, or just ignore it for full speed. > > > > Thats all. > > > > Hope this help. > > JAMH. > > ----- Original Message ----- > > From: "Bruce Peterson" <bap...@te... > <mailto:bap...@te...>> > > To: <vis...@li... > <mailto:vis...@li...>> > > Sent: Friday, October 31, 2008 12:30 AM > > Subject: [Visualpython-users] Vpython and wxPython > > > > > > > >> Hi Stef > >> I did this some years ago, but as I recall, the key to using > >> Vpython from Wx python is to create a client-server architecture. > >> Create your Vpython application as a com object with variable > >> parameters expressed as public methods. The server is launched from > >> your Wxpython application. The Wxpython app provides the UI and > >> allows updating the Vpython parameters with each pass through > the control > >> loop. > >> > >> Bruce > >> > >> At 03:10 PM 10/30/2008, you wrote: > >> > >>> From: Stef Mientki <s.m...@ru... <mailto:s.m...@ru...>> > >>> Precedence: list > >>> MIME-Version: 1.0 > >>> To: vis...@li... > <mailto:vis...@li...> > >>> Date: Thu, 30 Oct 2008 00:18:31 +0100 > >>> Message-ID: <490...@ru... > <mailto:490...@ru...>> > >>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >>> Subject: [Visualpython-users] WPython + wxPython possible ? > >>> Message: 5 > >>> > >>> hello, > >>> > >>> now there's some activity on the list, > >>> I (and many other wxPython users) would love to use VPython from a > >>> wxPython application. > >>> > >>> This doesn't seem to be possible at first sight, because both > >>> environments claim the main loop > >>> (but I'm not an expert). > >>> > >>> There's an example on youtube: > >>> http://www.youtube.com/watch?v=nMNzMwDXHLA > >>> > >>> but this could well be 2 separate applications, > >>> communicating in some clever way. > >>> But that's also an acceptable solution. > >>> > >>> Any suggestions / answers / links ? > >>> > >>> thanks, > >>> Stef Mientki > >>> > >> > ------------------------------------------------------------------------- > >> 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=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > >> _______________________________________________ > >> Visualpython-users mailing list > >> Vis...@li... > <mailto: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=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > _______________________________________________ > > Visualpython-users mailing list > > Vis...@li... > <mailto: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=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > <mailto: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 > |
From: Stef M. <s.m...@ru...> - 2008-10-31 14:58:26
|
hi Jasper, looks great !! Jasper Stolte wrote: > Hi all, > > After very little effort I got them working together a few weeks ago > in my pendulum simulator, which can be downloaded from google code.. I > wanted to post the result to the wx-python list when it is a bit more > mature, as it's not quite finished yet. Yes do so, I think it's very valuable for wxPython users !! > Anyway, run src/main.py, screenshot attached. It's got a wxPython part > which shows a slider with which you can influence the pendulum length. > Under Linux, this is a real-time simulation, but under Windows I guess > smth is messed up with the wx.Timer so it is very slow. At this moment I only looked at the picture, I'll try it this evening under windows to see how fast / slow it is. > > >> svn checkout */http > <http://pendulum-cart.googlecode.com/svn/trunk/>/*://pendulum-cart.googlecode.com/svn/trunk/ > > Anyway, the solution really was as simple as mentioned here. You can > just import visual and create a scene. This scene will then be > displayed in a separate window. As long as you keep track of the > visual object in the wxPython framework, you can manipulate it any way > you like from the wxPython program. > > Even nicer would be if somehow the OpenGL canvas would be available in > Python visual object, so you could really draw it to a wxPython > window. Now there's that extra GTK frame hanging around with the 3D > rendering. Not that this is a big issue or anything. Just something to > put on the wishlist for when the important things are already working.. ;) > yes that's the final step. I don't know if it's possible to dock arbitrary application in a wxPython window ? thanks, Stef Mientki > Greetz, > Jasper > > > > On Fri, Oct 31, 2008 at 1:36 AM, Stef Mientki <s.m...@ru... > <mailto:s.m...@ru...>> wrote: > > Jose, Bruce, > > thanks for your answers.... > > Jose Antonio Martin H wrote: > > Hi , > > > >> This doesn't seem to be possible at first sight, because both > >> environments claim the main loop > >> > > > > Vpython does not claim a main loop. > > > > You can simply create the scene, the objects, etc... > > > > And have your Wxpython program running, vpython will continue > executing and > > you can change the objects of vpython from whithin your App > directly. > > > That sounds really simple. > I've to admit, that I never investigated the possibilities, > because on the wxPython list, this is the usual answer: > > "Both wxpython and vpython are great tools, which I'd love to use > together for my program. The problem is they each run their own event > loop. Now almighty Google taught me there were some ancient threads on > the topic stating it would be very hard to combine the two." > > If I've some more time I'll certainly will try it. > > btw, does anyone has a (working) example of wxPython + VPython ? > > thanks again, > Stef Mientki > > > Also, you can indeed control the speed at wich the vpython do > what it to > > with the rate() comand, or just ignore it for full speed. > > > > Thats all. > > > > Hope this help. > > JAMH. > > ----- Original Message ----- > > From: "Bruce Peterson" <bap...@te... > <mailto:bap...@te...>> > > To: <vis...@li... > <mailto:vis...@li...>> > > Sent: Friday, October 31, 2008 12:30 AM > > Subject: [Visualpython-users] Vpython and wxPython > > > > > > > >> Hi Stef > >> I did this some years ago, but as I recall, the key to using > >> Vpython from Wx python is to create a client-server architecture. > >> Create your Vpython application as a com object with variable > >> parameters expressed as public methods. The server is launched from > >> your Wxpython application. The Wxpython app provides the UI and > >> allows updating the Vpython parameters with each pass through > the control > >> loop. > >> > >> Bruce > >> > >> At 03:10 PM 10/30/2008, you wrote: > >> > >>> From: Stef Mientki <s.m...@ru... <mailto:s.m...@ru...>> > >>> Precedence: list > >>> MIME-Version: 1.0 > >>> To: vis...@li... > <mailto:vis...@li...> > >>> Date: Thu, 30 Oct 2008 00:18:31 +0100 > >>> Message-ID: <490...@ru... > <mailto:490...@ru...>> > >>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed > >>> Subject: [Visualpython-users] WPython + wxPython possible ? > >>> Message: 5 > >>> > >>> hello, > >>> > >>> now there's some activity on the list, > >>> I (and many other wxPython users) would love to use VPython from a > >>> wxPython application. > >>> > >>> This doesn't seem to be possible at first sight, because both > >>> environments claim the main loop > >>> (but I'm not an expert). > >>> > >>> There's an example on youtube: > >>> http://www.youtube.com/watch?v=nMNzMwDXHLA > >>> > >>> but this could well be 2 separate applications, > >>> communicating in some clever way. > >>> But that's also an acceptable solution. > >>> > >>> Any suggestions / answers / links ? > >>> > >>> thanks, > >>> Stef Mientki > >>> > >> > ------------------------------------------------------------------------- > >> 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=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > >> _______________________________________________ > >> Visualpython-users mailing list > >> Vis...@li... > <mailto: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=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > > _______________________________________________ > > Visualpython-users mailing list > > Vis...@li... > <mailto: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=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > <mailto: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 > 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: CL <clc...@gm...> - 2008-10-31 01:26:34
|
It is possible and quite simple. I have intergrated it with PyODE and wxPython and make a robot simulator: http://hk.myblog.yahoo.com/jw!afd6dGGRHBRkp2laqwk198fg/article?mid=413 A robot arm controller also: http://hk.youtube.com/watch?v=c5RNDPbl_kY http://hk.youtube.com/watch?v=1tg5v9Z9BPw Use multiple thread can make the work down easily. Run the main application of wxPython as usual. _app = myApp(0) _app.MainLoop() Create the world scene = display(title=title, width=width,height=height,x=x,y=y) Create thread for the scene object control. Start the thread The thread's main loops is something like this: while not finish: update objects in the scene rate(time slice) CL |
From: Stef M. <s.m...@ru...> - 2008-10-31 00:36:32
|
Jose, Bruce, thanks for your answers.... Jose Antonio Martin H wrote: > Hi , > >> This doesn't seem to be possible at first sight, because both >> environments claim the main loop >> > > Vpython does not claim a main loop. > > You can simply create the scene, the objects, etc... > > And have your Wxpython program running, vpython will continue executing and > you can change the objects of vpython from whithin your App directly. > That sounds really simple. I've to admit, that I never investigated the possibilities, because on the wxPython list, this is the usual answer: "Both wxpython and vpython are great tools, which I'd love to use together for my program. The problem is they each run their own event loop. Now almighty Google taught me there were some ancient threads on the topic stating it would be very hard to combine the two." If I've some more time I'll certainly will try it. btw, does anyone has a (working) example of wxPython + VPython ? thanks again, Stef Mientki > Also, you can indeed control the speed at wich the vpython do what it to > with the rate() comand, or just ignore it for full speed. > > Thats all. > > Hope this help. > JAMH. > ----- Original Message ----- > From: "Bruce Peterson" <bap...@te...> > To: <vis...@li...> > Sent: Friday, October 31, 2008 12:30 AM > Subject: [Visualpython-users] Vpython and wxPython > > > >> Hi Stef >> I did this some years ago, but as I recall, the key to using >> Vpython from Wx python is to create a client-server architecture. >> Create your Vpython application as a com object with variable >> parameters expressed as public methods. The server is launched from >> your Wxpython application. The Wxpython app provides the UI and >> allows updating the Vpython parameters with each pass through the control >> loop. >> >> Bruce >> >> At 03:10 PM 10/30/2008, you wrote: >> >>> From: Stef Mientki <s.m...@ru...> >>> Precedence: list >>> MIME-Version: 1.0 >>> To: vis...@li... >>> Date: Thu, 30 Oct 2008 00:18:31 +0100 >>> Message-ID: <490...@ru...> >>> Content-Type: text/plain; charset=ISO-8859-1; format=flowed >>> Subject: [Visualpython-users] WPython + wxPython possible ? >>> Message: 5 >>> >>> hello, >>> >>> now there's some activity on the list, >>> I (and many other wxPython users) would love to use VPython from a >>> wxPython application. >>> >>> This doesn't seem to be possible at first sight, because both >>> environments claim the main loop >>> (but I'm not an expert). >>> >>> There's an example on youtube: >>> http://www.youtube.com/watch?v=nMNzMwDXHLA >>> >>> but this could well be 2 separate applications, >>> communicating in some clever way. >>> But that's also an acceptable solution. >>> >>> Any suggestions / answers / links ? >>> >>> thanks, >>> Stef Mientki >>> >> ------------------------------------------------------------------------- >> 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 > > > |
From: Jose A. M. H <jam...@fd...> - 2008-10-30 23:46:43
|
Hi , >This doesn't seem to be possible at first sight, because both >environments claim the main loop Vpython does not claim a main loop. You can simply create the scene, the objects, etc... And have your Wxpython program running, vpython will continue executing and you can change the objects of vpython from whithin your App directly. Also, you can indeed control the speed at wich the vpython do what it to with the rate() comand, or just ignore it for full speed. Thats all. Hope this help. JAMH. ----- Original Message ----- From: "Bruce Peterson" <bap...@te...> To: <vis...@li...> Sent: Friday, October 31, 2008 12:30 AM Subject: [Visualpython-users] Vpython and wxPython > Hi Stef > I did this some years ago, but as I recall, the key to using > Vpython from Wx python is to create a client-server architecture. > Create your Vpython application as a com object with variable > parameters expressed as public methods. The server is launched from > your Wxpython application. The Wxpython app provides the UI and > allows updating the Vpython parameters with each pass through the control > loop. > > Bruce > > At 03:10 PM 10/30/2008, you wrote: >>From: Stef Mientki <s.m...@ru...> >>Precedence: list >>MIME-Version: 1.0 >>To: vis...@li... >>Date: Thu, 30 Oct 2008 00:18:31 +0100 >>Message-ID: <490...@ru...> >>Content-Type: text/plain; charset=ISO-8859-1; format=flowed >>Subject: [Visualpython-users] WPython + wxPython possible ? >>Message: 5 >> >>hello, >> >>now there's some activity on the list, >>I (and many other wxPython users) would love to use VPython from a >>wxPython application. >> >>This doesn't seem to be possible at first sight, because both >>environments claim the main loop >>(but I'm not an expert). >> >>There's an example on youtube: >>http://www.youtube.com/watch?v=nMNzMwDXHLA >> >>but this could well be 2 separate applications, >>communicating in some clever way. >>But that's also an acceptable solution. >> >>Any suggestions / answers / links ? >> >>thanks, >>Stef Mientki > > > ------------------------------------------------------------------------- > 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-10-30 23:34:06
|
Ok, there were two documents necessary to read in order to install: linux_download.html and INSTALL.txt I did the "mkdir build" trick and found the build.log that told me to install g++. D'oh.. Now I get some fresh compilation errors. Seems like it won't find numpy which I'll look into some other day. Also, there are complaints over boost::python::numeric so I still wonder about the libboost-python-dev and libboost-threads-dev issue. /Anders On Thu, Oct 30, 2008 at 11:10 PM, Anders Petersson <an...@gm...> wrote: > Hello > I installed VMWare under Windows XP with a Fedora 9 image to get a > reasonable development environment for my hobby project. > > Here's the steps I went through to install VPython: > > Download vpython tar.bz2 (the beta) > install python-devel package > install boost-devel package > install numpy package > install gtkglextmm-devel package > install libglademm24-devel package > > I couldn't locate libboost-python-dev and libboost-threads-dev for > Fedora... can I use the Debian packages? > > In the mean time, let's try anyway. > > run ./configure > > run sudo make install > > Output: > <cut> > Making install in src > make[1]: Entering directory `/home/andpe/Download/visual-4.beta26/src' > Compiling ./core/arrow.cpp ... > make[1]: *** [arrow.lo] Error 1 > make[1]: Leaving directory `/home/andpe/Download/visual-4.beta26/src' > make: *** [install-recursive] Error 1 > > Strange, no error message. Any idea? > This is my gcc version: > gcc (GCC) 4.3.0 20080416 (Red Hat 4.3.0-7) > > Regards > /Anders Petersson > |
From: Bruce P. <bap...@te...> - 2008-10-30 23:30:46
|
Hi Stef I did this some years ago, but as I recall, the key to using Vpython from Wx python is to create a client-server architecture. Create your Vpython application as a com object with variable parameters expressed as public methods. The server is launched from your Wxpython application. The Wxpython app provides the UI and allows updating the Vpython parameters with each pass through the control loop. Bruce At 03:10 PM 10/30/2008, you wrote: >From: Stef Mientki <s.m...@ru...> >Precedence: list >MIME-Version: 1.0 >To: vis...@li... >Date: Thu, 30 Oct 2008 00:18:31 +0100 >Message-ID: <490...@ru...> >Content-Type: text/plain; charset=ISO-8859-1; format=flowed >Subject: [Visualpython-users] WPython + wxPython possible ? >Message: 5 > >hello, > >now there's some activity on the list, >I (and many other wxPython users) would love to use VPython from a >wxPython application. > >This doesn't seem to be possible at first sight, because both >environments claim the main loop >(but I'm not an expert). > >There's an example on youtube: >http://www.youtube.com/watch?v=nMNzMwDXHLA > >but this could well be 2 separate applications, >communicating in some clever way. >But that's also an acceptable solution. > >Any suggestions / answers / links ? > >thanks, >Stef Mientki |
From: Anders P. <an...@gm...> - 2008-10-30 22:10:06
|
Hello I installed VMWare under Windows XP with a Fedora 9 image to get a reasonable development environment for my hobby project. Here's the steps I went through to install VPython: Download vpython tar.bz2 (the beta) install python-devel package install boost-devel package install numpy package install gtkglextmm-devel package install libglademm24-devel package I couldn't locate libboost-python-dev and libboost-threads-dev for Fedora... can I use the Debian packages? In the mean time, let's try anyway. run ./configure run sudo make install Output: <cut> Making install in src make[1]: Entering directory `/home/andpe/Download/visual-4.beta26/src' Compiling ./core/arrow.cpp ... make[1]: *** [arrow.lo] Error 1 make[1]: Leaving directory `/home/andpe/Download/visual-4.beta26/src' make: *** [install-recursive] Error 1 Strange, no error message. Any idea? This is my gcc version: gcc (GCC) 4.3.0 20080416 (Red Hat 4.3.0-7) Regards /Anders Petersson |
From: Bruce S. <Bru...@nc...> - 2008-10-30 02:45:18
|
There are three ancient components of Visual that are pure Python (no C++, no multithreading issues, no cross-platform issues) that could benefit from some work and improvement: graph.py, controls.py, and text.py. The case of graph.py is a bit special, because some changes have been made to the version that goes with the upcoming Visual 5.00, so it would be important to pay attention to the differences. For example, gdots now use the new points object rather than letter o's in labels. If you feel confident in Python programming, please consider taking a look at these components and volunteering to improve them. Thanks! Bruce Sherwood |
From: Stef M. <s.m...@ru...> - 2008-10-29 23:18:48
|
hello, now there's some activity on the list, I (and many other wxPython users) would love to use VPython from a wxPython application. This doesn't seem to be possible at first sight, because both environments claim the main loop (but I'm not an expert). There's an example on youtube: http://www.youtube.com/watch?v=nMNzMwDXHLA but this could well be 2 separate applications, communicating in some clever way. But that's also an acceptable solution. Any suggestions / answers / links ? thanks, Stef Mientki |
From: chris l. <chr...@sp...> - 2008-10-29 18:44:59
|
I've used the slider and menu items from vpython and they have the advantage that you can keep all control within the vpython environment. They don't provide a complete GUI environment but allow a small degree of control but are not really suitable fro applications that might require lists of items that are larger than that that can be displayed in the one window and the lack of the exact size of the label window leads to some rather unexpected side effects. The mechanisms for transferring information from the visual python environment to a different GUI can get a little involved, o if you want something within the display window they still provide a nice quick alternative to multiple threads and queues. There is a controls.display attribute that allows you to mix controls and visual python objects in the same display. Anders Petersson wrote: > Personally I would be interested in such examples. Could you kindly > upload them to the wiki? Or maybe some links if there are already good > explanations. > > Thanks, > Anders Petersson > > On Wed, Oct 29, 2008 at 2:53 AM, marc desmarais <mde...@ya... > <mailto:mde...@ya...>> wrote: > > Regarding the use of sliders and other 2D GUI widgets, I would > really encourage folks to use Tkinter. It does a much better job. > > I can contribute examples if you want. > > Best to concentrate Vpython's efforts on 3D I think. > > Marc Desmarais > Long Beach, CA > > > > ------------------------------------------------------------------------- > 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=/ > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > <mailto: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 > |
From: Anders P. <an...@gm...> - 2008-10-29 18:29:12
|
Personally I would be interested in such examples. Could you kindly upload them to the wiki? Or maybe some links if there are already good explanations. Thanks, Anders Petersson On Wed, Oct 29, 2008 at 2:53 AM, marc desmarais <mde...@ya...> wrote: > Regarding the use of sliders and other 2D GUI widgets, I would really > encourage folks to use Tkinter. It does a much better job. > > I can contribute examples if you want. > > Best to concentrate Vpython's efforts on 3D I think. > > Marc Desmarais > Long Beach, CA > > > > ------------------------------------------------------------------------- > 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: marc d. <mde...@ya...> - 2008-10-29 01:53:37
|
Regarding the use of sliders and other 2D GUI widgets, I would really encourage folks to use Tkinter. It does a much better job. I can contribute examples if you want. Best to concentrate Vpython's efforts on 3D I think. Marc Desmarais Long Beach, CA |
From: Bruce S. <Bru...@nc...> - 2008-10-29 00:22:21
|
For technical reasons I was unable to respond to this earlier. Executing "range = 100" means that you've changed the interpretation of "range" to be a label for the integer constant "100", so that when you then try to loop over range the original interpretation (make a list) has been lost. However, use of "range" in a list of function arguments doesn't redefine its meaning outside that domain. Bruce Sherwood -------------------------- I have been studying Vpython modules Text and Controls and I am a little confused by the use of 'range'. The __init__ parameter list looks like this: > > def __init__(self, x=0, y=0, width=300, height=320, > > range=100,title=None, foreground=None, background=None): > > > > Now RANGE is of course a keyword, but it is being used here as a > > variable. > > > > Using IDLE 1.2.2 produces the following error. > > > > range=100 > > ...... > > for a in range(1,10):<br> > > ..... > > TypeError: 'int' object is not callable<br> > > > > Am I missing something? |
From: Bruce S. <Bru...@nc...> - 2008-10-28 21:13:19
|
Glad you like VPython! VPython was created in 2000 at Carnegie Mellon University for use by students doing computational modeling in an introductory physics course. As a result of that origin, it got known initially in physics education circles. However, it has been making its way out of that community. Particularly gratifying is that it is seeing growing use in the scientific research community, initially mainly physicists. The value of VPython to research scientists is that they sometimes have a need for a more flexible way to generate 3D images and data visualizations than any application or group of applications can provide. There is power in a programming environment that is difficult to capture in a nonprogramming application. I think it's fair to say that VPython lacks many things required for serious game construction, though I don't know enough about the issue to identify them precisely. Not sure what you have in mind about "draw resources away from VPython". At a personal level, I'm deeply involved with Ruth Chabay in trying to wrench introductory physics out of the 19th century, and this effort has been so enormously difficult that it has left little time for VPython development. However, the physics education effort is now somewhat mature, if unfinished (we need to produce a significant 3rd edition of our textbook by March), and I've deliberately been working on VPython again for the last year. I retired in July in part to delve more deeply into development. It was a hugely important accident that David Scherer, the originator of VPython, came back to work on it again during the last eight months. He has made an enormous difference in the quality of the new Visual 5 which will be released soon. The growth and stability of an open source project seem to depend on there being a number of developers who can contribute from time to time. Unfortunately, very few people in the VPython community have been able to contribute to its development and maintenance, because it is a complex multiplatform multithreaded C++ project. I see this as a significant problem. Bruce Sherwood Anders Petersson wrote: > Hello > > I'm a software developer living in Linköping, Sweden. Usually I don't do > programming in my spare time, but since a couple of weeks I'm working > intensely on a hobby project. I'm using VPython to create a program with > generic functionality to visualize, animate and edit data structures > such as graphs and trees. With 10K lines of code so far and still a long > way to go, it's a pretty ambitious project. > I hope to be able to return to you with some concrete results and > screenshots! > > I'm a fan of VPython. Using primitive 3D objects is the right > abstraction level for my project and VPython makes this easy to use. Of > course, all the benefits of Python are there too. Defining my own > __setattr__() allows me to continue to extend the VPython abstraction of > doing "obj.pos = (x,y,z)" etc. > > I'm happy to see that the project is evolving, with the beta of a new > major version and a new wiki. Actually I'm surprised to see that VPython > isn't more heavily used than it seems to be. It seems to be mostly used > in education to visualize physics etc. > http://www.vrplumber.com/py3d.py has a long list of Python 3D projects. > Other Python frameworks seem to provide either advanced but low-level > features, or are less complete than VPython. > Certainly there is a general need for an easy-to-use 3d engine for all > kinds of projects... but the only major VPython project I found is PyGeo. > > If I may trouble the list for some answers, to get a better view of > VPython and its community: > > What are your interests in VPython? What drives you to contribute to the > project? > > What do you think vpython's niche and goals are? Are there any design > decisions that limit the suitability of VPython for certain areas? (For > example game programming or large-scale visualization or animation) > > Are there competing projects that draw resources away from VPython? > > > For me right now, the weakest point is the handling of text in 3d > scenes. Labels don't integrate into the scene but floats on top of it, > covering all 3d objects. Maybe the Beta's (future?) ability to use > textures can be utilized with PIL to render texts into the scene rather > than on top of it. > > Interested to hear from you. > Regards, > Anders Petersson |
From: Anders P. <an...@gm...> - 2008-10-28 20:00:11
|
Hello I'm a software developer living in Linköping, Sweden. Usually I don't do programming in my spare time, but since a couple of weeks I'm working intensely on a hobby project. I'm using VPython to create a program with generic functionality to visualize, animate and edit data structures such as graphs and trees. With 10K lines of code so far and still a long way to go, it's a pretty ambitious project. I hope to be able to return to you with some concrete results and screenshots! I'm a fan of VPython. Using primitive 3D objects is the right abstraction level for my project and VPython makes this easy to use. Of course, all the benefits of Python are there too. Defining my own __setattr__() allows me to continue to extend the VPython abstraction of doing "obj.pos = (x,y,z)" etc. I'm happy to see that the project is evolving, with the beta of a new major version and a new wiki. Actually I'm surprised to see that VPython isn't more heavily used than it seems to be. It seems to be mostly used in education to visualize physics etc. http://www.vrplumber.com/py3d.py has a long list of Python 3D projects. Other Python frameworks seem to provide either advanced but low-level features, or are less complete than VPython. Certainly there is a general need for an easy-to-use 3d engine for all kinds of projects... but the only major VPython project I found is PyGeo. If I may trouble the list for some answers, to get a better view of VPython and its community: What are your interests in VPython? What drives you to contribute to the project? What do you think vpython's niche and goals are? Are there any design decisions that limit the suitability of VPython for certain areas? (For example game programming or large-scale visualization or animation) Are there competing projects that draw resources away from VPython? For me right now, the weakest point is the handling of text in 3d scenes. Labels don't integrate into the scene but floats on top of it, covering all 3d objects. Maybe the Beta's (future?) ability to use textures can be utilized with PIL to render texts into the scene rather than on top of it. Interested to hear from you. Regards, Anders Petersson |
From: Bruce S. <Bru...@nc...> - 2008-10-28 18:57:58
|
In Visual 3 (the production version), there is no support for unicode in label objects or display (window) titles. In Visual 5 about to be released, the following program displays Spanish correctly: #!/usr/bin/env python # -*- coding: latin-1 -*- from visual import * label(text=u'¿No está la niña?') However, even in Visual 5 there isn't yet unicode support for display titles. Bruce Sherwood Poul Riis wrote: > I can print the special Danish characters this way: > print 'Danish characters: > '+unichr(230)+unichr(248)+unichr(229)+unichr(198)+unichr(216)+unichr(197) > > - but how can I use them in display titles? > > > Poul Riis > |
From: Poul R. <Pou...@sk...> - 2008-10-28 16:25:46
|
I can print the special Danish characters this way: print 'Danish characters: '+unichr(230)+unichr(248)+unichr(229)+unichr(198)+unichr(216)+unichr(197) - but how can I use them in display titles? Poul Riis |
From: Poul R. <Pou...@sk...> - 2008-10-28 14:54:12
|
In the example below I expect the slider button to start in the middle of the horizontal rod (value 0). However, it starts at the very left and can only be moved to the middle of the rod. Am I doing something wrong? (I use the beta version of VPython) Poul Riis from visual import * from visual.controls import * scene=display(title="Sliding box",width=860,height=860,forward=(-2,-1,-0.5),up=(0,0,1),background=(1,1,1)) boxcontrol =controls(title='x-position', x=0, y=700, width=800, height=150, range=100) boxslider = slider(pos=(-100,0), width=2, length=200, min=-2, max=2, color=(0,1,0)) boxslider.value=0 xaxis=arrow(pos=(-3,0,0),axis=(6,0,0),color=(1,0,1),shaftwidth=0.05,fixedwidth = 1) yaxis=arrow(pos=(0,-3,0),axis=(0,6,0),color=(1,1,0),shaftwidth=0.05,fixedwidth = 1) zaxis=arrow(pos=(0,0,-3),axis=(0,0,6),color=(0,0,1),shaftwidth=0.05,fixedwidth = 1) for i in range(-5,6): for j in range(-5,6): box(pos=(i*0.5,j*0.5,-0.025),axis=(0,0,-0.05),width=0.45,height=0.45,color=(0.8,0.2,0.1)) slidingbox=box(axis=(0,0,0.4),width=0.6,height=0.4,color=(0,1,0)) rate(100) while 1: boxcontrol.interact() slidingbox.pos=(boxslider.value-2,1.5,0.2) |
From: <bre...@un...> - 2008-10-26 22:48:56
|
I'm no expert, but wouldn't it be cylinder(pos=(x1,y1,z1), axis=(x2-x1,y2-y1,z2-z1)) "Doug Mair" <dou...@gm...> 27/10/2008 08:40 AM To <vis...@li...> cc Subject [Visualpython-users] Line between two 3D points. Hi all, What is the VPython code to draw a cylinder between two arbitrary 3D points? I'm looking for an equivalent to the Windows GDI: line(x1, y1, x2, y2), but in 3d. Maybe Line(x1, y1, z1, x2, y2, z2) or Line(point1=(x,y,z), point2=(x,y,z)) It seems that I would have to calculate the angle vector between the two points and use that as the axis. Then I would have to calculate the distance between the two points. Is there an easier way? Sample code would help too. Thanks, Doug Mair ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ ------------------------------------------------------------------------- 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 UNITED GROUP This email message is the property of United Group. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you may not disclose, copy or distribute this email, nor take or omit to take any action in reliance on it. United Group accepts no liability for any damage caused by this email or any attachments due to viruses, interference, interception, corruption or unauthorised access. If you have received this email in error, please notify United Group immediately by email to the sender's email address and delete this document. |