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: David R. <ro...@ph...> - 2008-12-09 15:45:27
|
I'm attaching my build.log and config.log as requested (by the message printed when compiling). It looks like maybe I need a more recent boost library or something? If so, the autoconf test should be tightened, so I get a configure error telling me what's wrong... For those who don't want to look at long log files, the error message is: ./core/util/render_manager.cpp:4:26: warning: threadpool.hpp: No such file or directory ./core/util/render_manager.cpp:61:23: warning: no newline at end of file ./core/util/render_manager.cpp: In static member function 'static double cvisual::render_manager::paint_displays(const std::vector<cvisual::display*, std::allocator<cvisual::display*> >&, bool)': ./core/util/render_manager.cpp:14: error: 'boost::threadpool' has not been declared ./core/util/render_manager.cpp:14: error: expected initializer before '*' token ./core/util/render_manager.cpp:31: error: 'swap_thread_pool' was not declared in this scope ./core/util/render_manager.cpp:32: error: expected type-specifier ./core/util/render_manager.cpp:32: error: expected `;' ./core/util/render_manager.cpp:37: error: 'swap_thread_pool' was not declared in this scope ./core/util/render_manager.cpp:37: error: 'bind' is not a member of 'boost' ./core/util/render_manager.cpp:41: error: 'swap_thread_pool' was not declared in this scope David |
From: Bruce S. <Bru...@nc...> - 2008-12-09 14:31:01
|
I can only note that one environment that seems to have good 3D mousing is Second Life. Bruce Sherwood Stef Mientki wrote: > hello, > > This is a general question of how to manipulate 3D objects with the > mouse on 2D screen ? > > I've a default scene, with the centre in the middle of the screen. > I've created a room, with the floor in the positive xz-plane. > now I've objects on the ceiling, that can move and rotate in the xz-plane. > > I project both the mouse position and the objects to the floor, > and then calculate the angles and move or rotate the object. > > Sometimes this works great, but sometimes the movement seems to be > opposite to where my mouse is going, > especially the rotation behaves strange. > For rotating the following strategy works quit well, but seems very > unnatural to me: > - click the object to select it for rotation (around a fixed axis), > - move the cursor far away, moving in the direction away from the object > and thus from the axis of ration and from the center of the screen > - then move the mouse around the rotation point > > Are there better methods ? > Maybe some websites ? > > thanks, > Stef Mientki > > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2008-12-09 13:17:33
|
Change the three color statements like this: self.rr = string.atoi(rstr)/100.0 should be self.rr = int(rstr)/100.0 I think this is a Python 2.5 vs Python 2.4 issue. However, I'll comment that we've removed Tk-Visual.py from the example set because we could not figure out a way for this program to work on the Mac. With the new native-mode version for the Mac (no X11, no Fink), there is a clash between the Mac interact loop and that of Tk. Bruce Sherwood Symion wrote: > running V5.0 > Ran the example program Tk-Visual.py and IDLE recorded the following > error. > > VPython WARNING: errors in shader program: > Fragment shader(s) failed to link, vertex shader(s) linked. r > Exception in Tkinter callback > Traceback (most recent call last): > File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ > return self.func(*args) > File "C:\Python25\Lib\site-packages\visual\examples\Tk-Visual.py", > line 64, in <lambda> > scalebb = > Scale(tkr,orient=VERTICAL,from_=100,to=0,label="B",command=lambda str: > pp.set_blue(str)) > File "C:\Python25\Lib\site-packages\visual\examples\Tk-Visual.py", > line 45, in set_blue > self.bb = string.atoi(bstr)/100.0 > NameError: global name 'string' is not defined > > This type of error was repeated every time the RGB sliders were used. > > Symion > |
From: Bruce S. <Bru...@nc...> - 2008-12-09 13:11:11
|
You will see shader errors and/or the inability to display materials such as wood if your graphics hardware does not support Pixel Shader 3.0. The key point is this statement in the Visual 5.0 help (see the "What's new" section or the "materials" section): Materials will work with graphics cards that support Pixel Shader 3.0 ("PS 3.0"). For details, see http://en.wikipedia.org/wiki/Pixel_shader#Hardware. Some materials may work with graphics cards that support PS 2.0, but other materials may need to be manually disabled; see instructions in the site-settings.py module in the Visual package in your site-packages folder. If the graphics hardware does not support pixel shaders, the material property is ignored. If you think you should be able to use materials but have trouble with their display or performance, we highly recommend upgrading your video card drivers to the latest version. Bruce Sherwood P.S. It will be of interest to hear from users about what hardware does and doesn't work with materials. Symion wrote: > running V5.0 > Ran the example program texture_and_lighting.py and it seemed to > work, but IDLE reported the following error. > > VPython WARNING: errors in shader program: > Fragment shader(s) failed to link, vertex shader(s) linked. ˜ > VPython WARNING: errors in shader program: > Fragment shader(s) failed to link, vertex shader(s) linked. r > VPython WARNING: errors in shader program: > Fragment shader(s) failed to link, vertex shader(s) linked. r > > Something similar happens when running material_test.py. > > Symion |
From: Symion <sy...@pr...> - 2008-12-09 09:15:56
|
running V5.0 Ran the example program Tk-Visual.py and IDLE recorded the following error. VPython WARNING: errors in shader program: Fragment shader(s) failed to link, vertex shader(s) linked. r Exception in Tkinter callback Traceback (most recent call last): File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__ return self.func(*args) File "C:\Python25\Lib\site-packages\visual\examples\Tk-Visual.py", line 64, in <lambda> scalebb = Scale(tkr,orient=VERTICAL,from_=100,to=0,label="B",command=lambda str: pp.set_blue(str)) File "C:\Python25\Lib\site-packages\visual\examples\Tk-Visual.py", line 45, in set_blue self.bb = string.atoi(bstr)/100.0 NameError: global name 'string' is not defined This type of error was repeated every time the RGB sliders were used. Symion |
From: Symion <sy...@pr...> - 2008-12-09 07:09:22
|
Just installed Vpython 5.0 on a ASUS Notebook, running Windows Vista home edition and Python 2.5.2. No problems! Very friendly, very easy. Symion |
From: Symion <sy...@pr...> - 2008-12-09 06:45:22
|
running V5.0 Ran the example program texture_and_lighting.py and it seemed to work, but IDLE reported the following error. VPython WARNING: errors in shader program: Fragment shader(s) failed to link, vertex shader(s) linked. ˜ VPython WARNING: errors in shader program: Fragment shader(s) failed to link, vertex shader(s) linked. r VPython WARNING: errors in shader program: Fragment shader(s) failed to link, vertex shader(s) linked. r Something similar happens when running material_test.py. Symion |
From: <bre...@un...> - 2008-12-09 04:55:42
|
Great to see such a fantastic program being further developed and streamlined. It's already up and running on my Windows XP box. Much appreciation to Bruce and all the contributors. Bruce Sherwood <Bru...@nc...> 09/12/2008 02:22 PM To vpusers <vis...@li...> cc Subject [Visualpython-users] Visual 5.0 release candidate now available At vpython.org there is now available the Visual 5.0 release candidate for Windows, Intel Mac 10.5, and Linux. A version for PowerPC Mac is forthcoming. The Mac version does not use X11 nor depend on Fink. This new version has been tested against a sizable suite of existing programs, but it is likely that wider use will identify bugs to be fixed, so please report problems you may encounter. There remains a major component to be completed, which David Scherer is working on. There are various significant problems with IDLE, with particularly serious issues on the Mac (in fact, the MacPython IDLE has major mouse handling problems, which you can sometimes overcome by clicking in the title bar, and it doesn't even offer a configuration menu option for IDLE). If you find problems with IDLE, as you will at the very least on the Mac, you need not report them, as this is being worked on. Visual 5.0 was created by David Scherer and Bruce Sherwood. Jonathan Brandmeyer provided support in Visual 4beta for opacity, local lighting, and textures, and made some important architectural changes, but had to stop work on the project before it was completed. Further development has led to API changes which are incompatible with the Visual 4beta release, so this release is called version 5 instead of 4. The late Arthur Siegel implemented dependence on the currently supported numpy library in place of Numeric, which is no longer supported. Hugh Fisher provided a big start on the native-mode Mac version. Michael Temkine fixed some bugs and implemented keyboard handling for Windows. Previous to Visual 4beta, Jonathan Brandmeyer made several major contributions to Visual 3, including changing the connection between Python and C++ from CXX, which was no longer supported, to the Boost C++ libraries, and implementing auto-configurable installations for Linux. ------------------------------------------------------------------------------ SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. The future of the web can't happen without you. Join us at MIX09 to help pave the way to the Next Web now. Learn more and register at http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________ 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. |
From: Bruce S. <Bru...@nc...> - 2008-12-09 03:22:37
|
At vpython.org there is now available the Visual 5.0 release candidate for Windows, Intel Mac 10.5, and Linux. A version for PowerPC Mac is forthcoming. The Mac version does not use X11 nor depend on Fink. This new version has been tested against a sizable suite of existing programs, but it is likely that wider use will identify bugs to be fixed, so please report problems you may encounter. There remains a major component to be completed, which David Scherer is working on. There are various significant problems with IDLE, with particularly serious issues on the Mac (in fact, the MacPython IDLE has major mouse handling problems, which you can sometimes overcome by clicking in the title bar, and it doesn't even offer a configuration menu option for IDLE). If you find problems with IDLE, as you will at the very least on the Mac, you need not report them, as this is being worked on. Visual 5.0 was created by David Scherer and Bruce Sherwood. Jonathan Brandmeyer provided support in Visual 4beta for opacity, local lighting, and textures, and made some important architectural changes, but had to stop work on the project before it was completed. Further development has led to API changes which are incompatible with the Visual 4beta release, so this release is called version 5 instead of 4. The late Arthur Siegel implemented dependence on the currently supported numpy library in place of Numeric, which is no longer supported. Hugh Fisher provided a big start on the native-mode Mac version. Michael Temkine fixed some bugs and implemented keyboard handling for Windows. Previous to Visual 4beta, Jonathan Brandmeyer made several major contributions to Visual 3, including changing the connection between Python and C++ from CXX, which was no longer supported, to the Boost C++ libraries, and implementing auto-configurable installations for Linux. |
From: Stef M. <s.m...@ru...> - 2008-12-08 21:21:30
|
hello, This is a general question of how to manipulate 3D objects with the mouse on 2D screen ? I've a default scene, with the centre in the middle of the screen. I've created a room, with the floor in the positive xz-plane. now I've objects on the ceiling, that can move and rotate in the xz-plane. I project both the mouse position and the objects to the floor, and then calculate the angles and move or rotate the object. Sometimes this works great, but sometimes the movement seems to be opposite to where my mouse is going, especially the rotation behaves strange. For rotating the following strategy works quit well, but seems very unnatural to me: - click the object to select it for rotation (around a fixed axis), - move the cursor far away, moving in the direction away from the object and thus from the axis of ration and from the center of the screen - then move the mouse around the rotation point Are there better methods ? Maybe some websites ? thanks, Stef Mientki |
From: Stef M. <s.m...@ru...> - 2008-12-08 21:04:52
|
Sorry Bruce Bruce Sherwood wrote: > I say again that as is documented, and exploited in the routine I > posted, scene.mouse.alt etc. CAN be examined during a drag. > You're completely right. The program below is indeed working ok. My program didn't seem to work, because I tested too fast and my program (inclusive it's surrounding) is much slower, it looked like it didn't work. With my slow program, alt-shift-ctrl are detected much slower than the normal keys, so I'll go for something like the z-x-c keys. thanks, Stef |
From: Bruce S. <Bru...@nc...> - 2008-12-07 22:24:32
|
I say again that as is documented, and exploited in the routine I posted, scene.mouse.alt etc. CAN be examined during a drag. Here's a more complex version of the routine, in which you have to hit the sphere in order to begin to drag, and during the drag you can change the color of the sphere by ctrl, alt, or shift (or press b or g), or change the color back to white by releasing the key. scene.range=10 s = sphere(radius=0.5) drag = False while 1: rate(100) m = scene.mouse if m.events: mm = scene.mouse.getevent() if mm.drag and mm.pick is s: drag = True elif mm.drop: drag = False if drag: s.pos = m.pos if m.alt: s.color = color.red elif m.ctrl: s.color = color.cyan elif m.shift: s.color = color.yellow else: s.color = color.white if scene.kb.keys: k = scene.kb.getkey() if k == 'b': s.color = color.blue elif k == 'g': s.color = color.green Why do you say that these keys can't be detected during a drag, when this routine and the previous routine I posted show them being detected? I'm confused. It is true that keyboard events do not include pressing ctrl or alt of shift by themselves: they are modifiers of other keys. Bruce Sherwood Stef Mientki wrote: > thanks Bruce, > > Bruce Sherwood wrote: >> Information about crtl, alt, and shift is part of scene.mouse; see the >> documentation on handling mouse events. > But as far as I can see: > - the status of Ctrl / Alt doesn't change if there's no mouse event, i.e > when dragging an object. > - Ctrl / Alt isn't catched by the keyboard event >> Also, keyboard events need not block, just as mouse events need not >> block. scene.kb.keys is nonzero if there is a keyboard event waiting >> to be processed, just as scene.mouse.events is nonzero if there is a >> mouse event wating to be processed. > Thanks, I didn't read that correct . >> I'm guessing that what you mean by your final question is whether it >> is possible to specify a function to be called when an event occurs, >> rather than watching for an event in a loop, as in the routine above. >> The answer is no; you have to detect events in a loop. >> > No, but you gave the answer above, > > cheers, > Stef >> Bruce Sherwood >> >> Stef Mientki wrote: >>> hello, >>> >>> I would like to detect if one of the special keys, >>> like Ctrl-Alt-Shift changes during mouse dragging. >>> >>> As far as I can see, >>> this doesn't seem possible, >>> because >>> - those keys don't generate a mouse event >>> - waiting for a key event blocks the dragging >>> Is this correct ? >>> >>> A more general question is: >>> is it possible to detect key or mouse events, >>> without waiting to happen ? >>> >>> thanks, >>> Stef >>> >>> ------------------------------------------------------------------------------ >>> >>> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >>> Nevada. >>> The future of the web can't happen without you. Join us at MIX09 to >>> help >>> pave the way to the Next Web now. Learn more and register at >>> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >>> >>> _______________________________________________ >>> Visualpython-users mailing list >>> Vis...@li... >>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Stef M. <s.m...@ru...> - 2008-12-07 21:10:49
|
thanks Bruce, Bruce Sherwood wrote: > Information about crtl, alt, and shift is part of scene.mouse; see the > documentation on handling mouse events. But as far as I can see: - the status of Ctrl / Alt doesn't change if there's no mouse event, i.e when dragging an object. - Ctrl / Alt isn't catched by the keyboard event > > Also, keyboard events need not block, just as mouse events need not > block. scene.kb.keys is nonzero if there is a keyboard event waiting > to be processed, just as scene.mouse.events is nonzero if there is a > mouse event wating to be processed. Thanks, I didn't read that correct . > > I'm guessing that what you mean by your final question is whether it > is possible to specify a function to be called when an event occurs, > rather than watching for an event in a loop, as in the routine above. > The answer is no; you have to detect events in a loop. > No, but you gave the answer above, cheers, Stef > Bruce Sherwood > > Stef Mientki wrote: >> hello, >> >> I would like to detect if one of the special keys, >> like Ctrl-Alt-Shift changes during mouse dragging. >> >> As far as I can see, >> this doesn't seem possible, >> because >> - those keys don't generate a mouse event >> - waiting for a key event blocks the dragging >> Is this correct ? >> >> A more general question is: >> is it possible to detect key or mouse events, >> without waiting to happen ? >> >> thanks, >> Stef >> >> ------------------------------------------------------------------------------ >> >> SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, >> Nevada. >> The future of the web can't happen without you. Join us at MIX09 to >> help >> pave the way to the Next Web now. Learn more and register at >> http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ >> >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |
From: Bruce S. <Bru...@nc...> - 2008-12-07 16:30:05
|
I'm not sure I've understood the issues, but two comments that may be relevant: 1) There is a math routine (imported by Visual) that returns angles between 0 and 2*pi: atan2(y,x). 2) In the documentation for frame there is a routine for converting from a position in a frame to world coordinates. Bruce Sherwood Stef Mientki wrote: > hello, > > playing a few days with vpython, > I'm very satisfied, it's really powerful. > But I've the idea, > I'm missing a few convenience procedures (or at least they are hidden). > > When animating our normal 3D world, > we always have a floor, > as a beginner I've the the xz-plane. > > Now when moving objects with the mouse around in this environment, > I found out that the best thing todo is to project the mouse position on > the floor. > Ok there is a method for, so perfect. > But I also want other vectors to be projected onto the floor, > so I made a small ( 1 line ;-) routine for that. > After moving that routine to a general library, > I discovered that there's also a "proj" routine inside visual. > So apparently there might be some interesting hidden routines ? > > Back to the angle difference, > for my case: mouse position and all objects projected to the floor, > you can unambiguous determine an angle between 0 and 2*pi. > This makes life so much easier. > So why isn't there a procedure for calculating such a difference angle ? > Or am I doing something stupid by projecting everything on the floor ? > Or does nobody uses these kind mouse interactions ? > Or ...? > Anyway here is the small method > > def XZ_Angle ( axis ) : > """projects the vector on the XZ-plane and > calculates the angle with the X-axis [ 0 .. 2*pi ]""" > axis = vector ( axis.x, 0, axis.z ) > a1 = axis.diff_angle ( X_AXIS ) > a2 = axis.diff_angle ( Z_AXIS ) > if a2 < pi/2 : > a1 = 2*pi - a1 > return a1 > > Although trivial, a procedure that translates radians into degrees is > very handy in debugging. > And of course the frame to world translation would be a good candidate > for the convenience library. > > Just some thoughts of a beginner, > > cheers, > Stef Mientki > > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2008-12-07 16:25:46
|
Information about crtl, alt, and shift is part of scene.mouse; see the documentation on handling mouse events. Also, keyboard events need not block, just as mouse events need not block. scene.kb.keys is nonzero if there is a keyboard event waiting to be processed, just as scene.mouse.events is nonzero if there is a mouse event wating to be processed. Here is an example: scene.range=10 s = sphere(radius=0.5) while 1: rate(100) m = scene.mouse # dragging with mouse buttons up s.pos = m.pos if m.alt: s.color = color.red elif m.ctrl: s.color = color.cyan elif m.shift: s.color = color.yellow if scene.kb.keys: k = scene.kb.getkey() if k == 'b': s.color = color.blue elif k == 'g': s.color = color.green I'm guessing that what you mean by your final question is whether it is possible to specify a function to be called when an event occurs, rather than watching for an event in a loop, as in the routine above. The answer is no; you have to detect events in a loop. Bruce Sherwood Stef Mientki wrote: > hello, > > I would like to detect if one of the special keys, > like Ctrl-Alt-Shift changes during mouse dragging. > > As far as I can see, > this doesn't seem possible, > because > - those keys don't generate a mouse event > - waiting for a key event blocks the dragging > Is this correct ? > > A more general question is: > is it possible to detect key or mouse events, > without waiting to happen ? > > thanks, > Stef > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Stef M. <s.m...@ru...> - 2008-12-07 10:29:12
|
hello, playing a few days with vpython, I'm very satisfied, it's really powerful. But I've the idea, I'm missing a few convenience procedures (or at least they are hidden). When animating our normal 3D world, we always have a floor, as a beginner I've the the xz-plane. Now when moving objects with the mouse around in this environment, I found out that the best thing todo is to project the mouse position on the floor. Ok there is a method for, so perfect. But I also want other vectors to be projected onto the floor, so I made a small ( 1 line ;-) routine for that. After moving that routine to a general library, I discovered that there's also a "proj" routine inside visual. So apparently there might be some interesting hidden routines ? Back to the angle difference, for my case: mouse position and all objects projected to the floor, you can unambiguous determine an angle between 0 and 2*pi. This makes life so much easier. So why isn't there a procedure for calculating such a difference angle ? Or am I doing something stupid by projecting everything on the floor ? Or does nobody uses these kind mouse interactions ? Or ...? Anyway here is the small method def XZ_Angle ( axis ) : """projects the vector on the XZ-plane and calculates the angle with the X-axis [ 0 .. 2*pi ]""" axis = vector ( axis.x, 0, axis.z ) a1 = axis.diff_angle ( X_AXIS ) a2 = axis.diff_angle ( Z_AXIS ) if a2 < pi/2 : a1 = 2*pi - a1 return a1 Although trivial, a procedure that translates radians into degrees is very handy in debugging. And of course the frame to world translation would be a good candidate for the convenience library. Just some thoughts of a beginner, cheers, Stef Mientki |
From: Stef M. <s.m...@ru...> - 2008-12-07 10:08:22
|
hello, I would like to detect if one of the special keys, like Ctrl-Alt-Shift changes during mouse dragging. As far as I can see, this doesn't seem possible, because - those keys don't generate a mouse event - waiting for a key event blocks the dragging Is this correct ? A more general question is: is it possible to detect key or mouse events, without waiting to happen ? thanks, Stef |
From: Symion <sy...@pr...> - 2008-12-06 09:57:40
|
I have been reading the Vpython message lists and it seems there is some confusion over Rotating objects and Spinning around the the scene under User control. Here is a simple routine that demonstrates both. http://home.primusonline.com.au/knoware/python/Wheel-2.py Click into the scene with left mouse key and the Centre position of the User spin is changed. Press Enter key to try again. |
From: Bruce S. <Bru...@nc...> - 2008-12-05 20:39:20
|
If by "rotate" you mean that you used the mouse to rotate the camera around the scene, then scene.forward points from the camera to scene.center. If by "rotate" you mean that you rotated the box by a program statement through an angle of 0.5*pi, the simple way to know what angle it was rotated through would be to save that angle. But notice that if you rotated around the axis of the box, the box's up vector will have changed. Bruce Sherwood Stef Mientki wrote: > hello, > > I wonder, > if I rotate a box around it's axis, > how can I determine the rotation angle afterwards ? > > I don't see any property indicating the angle. > It should be kept somewhere ? > > thanks, > Stef Mientki > > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Stef M. <s.m...@ru...> - 2008-12-05 20:34:34
|
hello, I wonder, if I rotate a box around it's axis, how can I determine the rotation angle afterwards ? I don't see any property indicating the angle. It should be kept somewhere ? thanks, Stef Mientki |
From: Bruce S. <Bru...@nc...> - 2008-12-05 20:25:14
|
No clue. With visual 3.2.11 on Python 2.5.2 on Vista, the text is red, and setting line=0 has no effect. The only thing I can think to do is to reinstall Visual. Bruce Gary Strangman wrote: > Hi all, > > The following minimal example on my machine produces a /white/ label in > the center of the screen. Doesn't matter what I use for the color keyword: > color=visual.color.red or color=(1,0,0) or color=(1.0,0.0,0.0), I always > get a white label. Any guesses as to what's going on? > > C:\testdir\ python > Enthought Python Distribution (2.5.2001) -- http://code.enthought.com > > Python 2.5.2 |EPD 2.5.2001| (release25-maint:60919M, Feb 21 2008, > 10:31:43) [MSC > v.1310 32 bit (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. >>>> import visual >>>> print visual.version > (3, 2, 11) >>>> a = visual.label(text='test',color=(1,0,0)) >>>> > > This is on WinXP (32bit) ... > > Un(?)related, I'm also getting the surprising (to me) effect that if I set > the label keyword line=0, the label disappears entirely, regardless of > visibility, which doesn't appear to be the documented behavior. > > I'm coming back to VPython after a long hiatus (from v2.something_small), > so I'm probably missing something silly here. > > -best > Gary > > ------------------------------------------------------------------------------ > SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada. > The future of the web can't happen without you. Join us at MIX09 to help > pave the way to the Next Web now. Learn more and register at > http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2008-12-05 20:11:34
|
We are very much committed to Visual 3 programs running in Visual 5. We've tested against a large suite of programs to make sure that there is compatibility between Visual 3 and Visual 5. Of course someone may find an incompatibility that we've missed, in which case we'll try to fix the problem. In a few very rare cases we've broken something. One arcane example I can think of is that if you gave negative numbers in specifying the size of a box, Visual 3 didn't object but went ahead and did something. Visual 5 initially didn't object but went ahead and did something, something else. So now Visual 5 gives a program error if you try to specify a negative number for length, height, or width. There are a few minor things not yet implemented, and that are unlikely to get implemented for the release of Visual 5.00: scene.cursor.visible is not implemented, nor scene.stereodepth, nor mouse events involving the right or middle mouse button. On the other hand, as we've been warning since last March, we have NOT preserved compatibility with some features that were new to Visual 4beta. Bruce Sherwood Gary Pajer wrote: > Will programs written for version 3 run on version 5? > > In particular, I have visual.version = (3, 2, 11) > > Sorry if this has been asked and answered. I couldn't find a > reference to this question. > > -gary > > On Tue, Dec 2, 2008 at 8:14 PM, Bruce Sherwood <Bru...@nc...> wrote: >> Visual 5 is not quite ready for release, but it's very close. >> >> A preview is now available at vpython.org. Click on the link at the top >> of the page for what will be the new web site, including screen shots >> and full documentation. In the documentation section there is a page >> describing the new features. >> >> Bruce Sherwood |
From: Stef M. <s.m...@ru...> - 2008-12-05 19:50:25
|
hello, looks like a silly question, but simply setting the y-value to zero, for a projection on the xz plane, has terrible side effects. blok = box ( pos = ( 5,4,6)) print blok.pos a = blok.pos a.y = 0 print blok.pos gives me: <5, 4, 6> <5, 0, 6> help the blok is moved ! inserting copy or deepcopy import copy a = copy.copy ( blok.pos ) gives me ArgumentError: Python argument types in None.None(Vector, int) did not match C++ signature: None(visual::shared_vector {lvalue}, d) I can hardly believe that it has to be done in this way: a = vector ( blok.pos.x, 0, blok.pos.z ) thanks, Stef |
From: Gary S. <st...@nm...> - 2008-12-05 18:22:06
|
Hi all, The following minimal example on my machine produces a /white/ label in the center of the screen. Doesn't matter what I use for the color keyword: color=visual.color.red or color=(1,0,0) or color=(1.0,0.0,0.0), I always get a white label. Any guesses as to what's going on? C:\testdir\ python Enthought Python Distribution (2.5.2001) -- http://code.enthought.com Python 2.5.2 |EPD 2.5.2001| (release25-maint:60919M, Feb 21 2008, 10:31:43) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import visual >>> print visual.version (3, 2, 11) >>> a = visual.label(text='test',color=(1,0,0)) >>> This is on WinXP (32bit) ... Un(?)related, I'm also getting the surprising (to me) effect that if I set the label keyword line=0, the label disappears entirely, regardless of visibility, which doesn't appear to be the documented behavior. I'm coming back to VPython after a long hiatus (from v2.something_small), so I'm probably missing something silly here. -best Gary |
From: Scott D. D. <Sco...@Ac...> - 2008-12-05 17:30:14
|
k roy wrote: > I have got a small doubt which is definitely stupid, but I need to > know that when we write > "from visual import *" > where is the visual directory present from which the modules are extracted. > Is it /usr/lib/python2.5/site-packages/visual or somewhere else??? Easiest answer to this is: import visual print visual.__file__ --Scott David Daniels Scott David Da...@Ac... |