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: petro f. <pet...@gm...> - 2008-03-25 07:09:44
|
Hi Bruce, Now I can dispose my scene ..very happy :D I dont read carefully the visual help ( on visual help write as sceneb ...not scene , actually it's same ...) but when I clicked close is oke to close the scene but the program is getting hang there are code of animation.. while 1: rate(100) for self.wave in self.waves: ..bla..bla.. it's came from visual example - wave.py I think when I close the scene window, it was not clear all the process that running within scene. Question ..I should fixed the code ? or there are method of scene to clear all process? Thank you very much. 2008/3/25, Bruce Sherwood <Bru...@nc...>: > > I'm not quite sure what it is you want to do, and I don't recognize your > references to "WINDOW_ON_CLOSE" and "WINDOW_ON_EXIT", but here are two > relevant points: > > 1) As stated in the Visual help, setting scene2.exit = False means that > clicking the close box on the display named "scene2" closes that display > but doesn't halt the program and doesn't close other displays. > > 2) You can dispose of a display "scene2" by saying scene2.visible = > False, > > Bruce Sherwood > |
From: Astan C. <st...@al...> - 2008-03-25 05:38:54
|
Hi, I have a simple VPython simulation that attempts to move the camera based on keyboard input. For some reason the amount of movement is not consistent in any particular direction regardless of value. Can anyone tell me why? Is there something wrong with my code? Thanks for the help. Here is my code. from __future__ import division from visual import * import random if __name__ == '__main__': # Set up window and sceen. scene = display() scene.fullscreen = 0 scene.autocenter = 0 scene.autoscale = 0 scene.userzoom = 0 scene.userspin = 0 scene.ambient = 0 outer = 10 outer*= 2 scene.range = (outer,outer,outer) rate(50) sunpos = [0,0,0] color = [ 3, 1.5, .75] sunradius = 2 sun = sphere( pos=sunpos, radius=sunradius, color=color) while True: if scene.kb.keys: s = scene.kb.getkey() #move in if s == 'up': newforward = vector(0,0,1.25) scene.center = scene.mouse.camera-newforward*mag(scene.center-scene.mouse.camera) #move out if s == 'down': newbackward = vector(0,0,-1.25) scene.center = scene.mouse.camera-newbackward*mag(scene.center-scene.mouse.camera) #move left if s == 'left': newbackward = vector(-1.25,0,0) scene.center = scene.mouse.camera-newbackward*mag(scene.center-scene.mouse.camera) #move right if s == 'right': newbackward = vector(1.25,0,0) scene.center = scene.mouse.camera-newbackward*mag(scene.center-scene.mouse.camera) -- "Formulations of number theory: Complete, Consistent, Non-trivial. Choose two." Animal Logic http://www.animallogic.com Please think of the environment before printing this email. This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free. |
From: Bruce S. <Bru...@nc...> - 2008-03-25 03:55:05
|
I'm not quite sure what it is you want to do, and I don't recognize your references to "WINDOW_ON_CLOSE" and "WINDOW_ON_EXIT", but here are two relevant points: 1) As stated in the Visual help, setting scene2.exit = False means that clicking the close box on the display named "scene2" closes that display but doesn't halt the program and doesn't close other displays. 2) You can dispose of a display "scene2" by saying scene2.visible = False, then scene2 = None. Python maintains a count of references to every object. For example, a = [1, 2, 3] and b = a means that there are two references to the list. If you then say b = 5 or b = None, there is only one reference to the list. If you then also say a = 3 or a = None, there are no references to the list, no way to refer to the list, and Python is free to delete the list from memory and free up that memory. In Visual, there's one extra reference in the reference count of an object or display, namely the human viewer. If a = sphere(), the reference count for the sphere object is 2. If you then say a = None, the reference count decrements to 1 (the human viewer), and the sphere will not be deleted by Python. If you do want to delete the sphere from memory, first say a.visible = False, then a = None; this will decreases the number of references to the sphere to zero. Here is the summary in the Visual help: Deleting an Object To delete a Visual object just make it invisible: ball.visible = 0 Technical detail: If you later re-use the name ball, for example by creating a new object and naming it ball, Python will be free to release the memory used by the object formerly named ball (assuming no other names currently refer to that object). Bruce Sherwood petro finder wrote: > Hi All, > > I am calling scene to display an object from tk, I know how to hide / > visible the scene > but i don't know how to close or dispose the scene without exit all > programs. > I click at up right conner button of the scene to dispose/close it but > it exit all programs/tk main program! > I look at the documentation of visualpython there is no explanation of > WINDOW_ON_CLOSE, WINDOW_ON_EXIT ..etc on the scene. i use visualpython > ver2.5-3.2.11 > Does someone can show me a simple program to dispose the scene which > call from a method ? > or tell me where is good documentation/references. > > Thank you very much > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: petro f. <pet...@gm...> - 2008-03-25 03:07:35
|
Hi All, I am calling scene to display an object from tk, I know how to hide / visible the scene but i don't know how to close or dispose the scene without exit all programs. I click at up right conner button of the scene to dispose/close it but it exit all programs/tk main program! I look at the documentation of visualpython there is no explanation of WINDOW_ON_CLOSE, WINDOW_ON_EXIT ..etc on the scene. i use visualpython ver2.5-3.2.11 Does someone can show me a simple program to dispose the scene which call from a method ? or tell me where is good documentation/references. Thank you very much |
From: Bruce S. <Bru...@nc...> - 2008-03-24 23:27:32
|
I think you probably meant lefteye.look(20) rhyteye.look(20) to be lefteye.look(s=20) rhyteye.look(s=20) It's interesting that this program does not run in Visual 4, because scene.objects lists frames, not the objects in those frames. So the reference to scene.objects[1] refers to a frame, which doesn't have a radius attribute. We certainly are trying not to break existing programs, and no one noticed this incompatibility. The intent was to make better sense out of scene.objects, in which listing both frames and the objects inside those frames is a bit odd. In Visual 3 lights are solely at infinity, so there's no good way to light orbiting planets appropriately. You can of course continually change the direction of these infinitely-far-away lights, but that's not really what you want. In Visual 4 there are local lights which may do the trick. In Visual 4 there are also spotlights, but in the current review of Visual 4 there are questions about supporting spotlights. And in any case, the Sun isn't a spotlight..... Bruce Sherwood Symion wrote: > Hi there. > Here is a short python program that draws a simple face with roving > eyes. As you right mouse the image, the eyes follow you. > Change the position of the eyes with the cursor keys. > > Next step is to develop a topographic head with moving eyelids and > eyebrows, then a little more work on the mouth and hey presto - A > robotic head! > > Demonstrates how easy Vpython is to use. > > My Wish List: > Figure out how to use the *scene.lights* function, so that orbiting > objects are illuminated from a single source. > i.e. Planets orbiting the Sun must change the angle of illumination. > I've tried a few ideas but so far nothing works! > Does anyone have a solution? > > Cheers Symion > > from __future__ import division > from visual import * > from random import * > print '''Crazy Eyeballs -(c) Symion 2008 > > Use cursor keys to control eye position and width''' > > class eyeball: > def __init__(self,p=(0,0,0),r=1.0,c=[(1,0,0)]*6,a=(0,1,0)): > self.pos=p > self.radius=r > self.color=c > self.axis=a > self.eye=frame() > sphere(frame=self.eye,pos=p,radius=r,axis=a,color=c[0]) > for a in range(1,6): > > sphere(frame=self.eye,pos=vector(scene.objects[-1].pos.x+scene.objects[-1].radius/1.618,scene.objects[-1].pos.y,scene.objects[-1].pos.z),radius=scene.objects[-1].radius/1.618,color=c[a]) > > def look(self,k=True,s=1.0): > if k==True and s!=0: > self.eye.rotate(angle=((2*pi)/s)) > > self.eye.axis=(scene.mouse.camera-self.eye.pos) > > ## > d=[(3,3,3)] > for a in range(1,5): > d.append((uniform(0,1),uniform(0,1),uniform(0,1))) > > d.append((0,0,0)) > ## Initialize Display > scene.autoscale=0 > scene.title='Crazy EyeBalls - (c) 2008 Symion' > scene.background=(0,0.1,0.2) > scene.ambient=0.5 > ## Begin > eyesize=1.4 > lefteye=eyeball(p=(0,0,0),r=eyesize,a=(1,0,0),c=d) > rhyteye=eyeball(p=(0,0,0),r=eyesize,a=(1,0,0),c=d) > ## Draw Face - Eyebrows > box(pos=(0,5,-3),length=4,width=1,height=1,axis=(-1,-1,2),color=(0.4,0.4,0.4)) > obj=scene.objects > box(pos=vector(obj[-1].pos.x+1.5,obj[-1].pos.y,obj[-1].pos.z-3),length=3,width=1,height=1,axis=(-1,1,2),color=(0.4,0.4,0.4)) > box(pos=(0,5,3),length=4,width=1,height=1,axis=(1,1,2),color=(0.4,0.4,0.4)) > obj=scene.objects > box(pos=vector(obj[-1].pos.x+1.5,obj[-1].pos.y,obj[-1].pos.z+3),length=3,width=1,height=1,axis=(1,-1,2),color=(0.4,0.4,0.4)) > ## Nose > box(pos=vector(-1,0,0),length=5,width=1,height=1,axis=(.5,1,0),color=(1,1,1)) > obj=scene.objects > box(pos=vector(obj[-1].pos.x-.5,obj[-1].pos.y-1.8,obj[-1].pos.z),length=1,width=3,height=1,axis=(0,1,0),color=(1,1,1)) > obj=scene.objects > ## Lips > box(pos=vector(obj[-1].pos.x,obj[-1].pos.y-3,obj[-1].pos.z),length=.5,width=4,height=.8,color=(1,0,0)) > box(pos=vector(obj[-1].pos.x,obj[-1].pos.y-2,obj[-1].pos.z),length=.5,width=5,height=.5,color=(1,0,0)) > ## Position Eyes > lefteye.eye.pos=(0,2.0,-2.5) > rhyteye.eye.pos=(0,2.0, 2.5) > ## Select viewing angle > scene.forward=vector(14.1868312021088, -3.63010737884212, > 0.00013678986975335) > scene.range=vector(8,8,8) > scene.fov=1 > > while 1: > rate(100) > lefteye.look(20) > rhyteye.look(20) > > if scene.kb.keys>0: > kb=scene.kb.getkey() > if kb=='down': > lefteye.eye.pos.y-=0.5 > rhyteye.eye.pos.y-=0.5 > elif kb=='up': > lefteye.eye.pos.y+=0.5 > rhyteye.eye.pos.y+=0.5 > elif kb=='left': > lefteye.eye.pos.z-=0.5 > rhyteye.eye.pos.z+=0.5 > elif kb=='right': > lefteye.eye.pos.z+=0.5 > rhyteye.eye.pos.z-=0.5 > else: > pass > else: > pass > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Bruce S. <Bru...@nc...> - 2008-03-24 17:18:51
|
At the technical architectural level of VPython, the stereo capability isn't really a start on having separate views. Rendering is done on a per-window (per-display) basis, with the added feature that if a display has stereo active, additional graphics are added to the display inside that rendering. It will probably require fairly major restructuring of Visual to achieve the desired effects of enabling multiple views on objects. We'll try to keep these interesting suggestions in mind in the intense work going on right now on improving Visual 4, but my guess is that multiple views won't happen soon. Bruce Sherwood Jon Schull wrote: > Another application is for immersive computing. We have created an > inexpensive immersive four screen projection system. > > I should think that the stereoscopic capabilities in Vpython are already a > start on this? > > > On 3/24/08 12:21 PM, "Rob Salgado" <sa...@ph...> wrote: > > >>Yes, this would be a great idea. >> >>In some of my past programs, I've done that clumsy workaround >>("a separate scene for each view, and copy each object into all of them,...") >>that you have suggested. In fact, my workaround raised the bug(?)/feature >>of copyobjects() in an earlier version of VPython. >> >>Here are some ideas where multiple-views of the same scene would be useful: >> >>- a zoomed-in view akin to a magnifying glass over the scene >> >>- top-view vs. side-views (as seen in engineering graphics) >> >>- different reference frames for two-body collisions, for >>inertial-vs-noninertial viewpoints, and for other relativistic situations >>[these are merely "camera" transformations] >> >>- alternate representations: spatial-vs-spacetime viewpoints [the spatial >>one being a "projection" of the spacetime one] >> >>It seems this multiple-viewpoint feature would require fewer Python >>objects and less bookkeeping of these objects... as well as be more >>faithfully representative of the idea that one physical situation is being >>viewed from different perspectives. >> >> >>rob salgado >> >> >> >> >> >> >> >> >> >>------------------------------------------------------------------------- >>This SF.net email is sponsored by: Microsoft >>Defy all challenges. Microsoft(R) Visual Studio 2008. >>http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >>_______________________________________________ >>Visualpython-users mailing list >>Vis...@li... >>https://lists.sourceforge.net/lists/listinfo/visualpython-users > > > Jon Schull sc...@di... cell: 585-738-6696 > Associate Professor Rochester Institute of Technology > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Jon S. <js...@gm...> - 2008-03-24 16:32:40
|
Another application is for immersive computing. We have created an inexpensive immersive four screen projection system. I should think that the stereoscopic capabilities in Vpython are already a start on this? On 3/24/08 12:21 PM, "Rob Salgado" <sa...@ph...> wrote: > > Yes, this would be a great idea. > > In some of my past programs, I've done that clumsy workaround > ("a separate scene for each view, and copy each object into all of them,...") > that you have suggested. In fact, my workaround raised the bug(?)/feature > of copyobjects() in an earlier version of VPython. > > Here are some ideas where multiple-views of the same scene would be useful: > > - a zoomed-in view akin to a magnifying glass over the scene > > - top-view vs. side-views (as seen in engineering graphics) > > - different reference frames for two-body collisions, for > inertial-vs-noninertial viewpoints, and for other relativistic situations > [these are merely "camera" transformations] > > - alternate representations: spatial-vs-spacetime viewpoints [the spatial > one being a "projection" of the spacetime one] > > It seems this multiple-viewpoint feature would require fewer Python > objects and less bookkeeping of these objects... as well as be more > faithfully representative of the idea that one physical situation is being > viewed from different perspectives. > > > rob salgado > > > > > > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users Jon Schull sc...@di... cell: 585-738-6696 Associate Professor Rochester Institute of Technology |
From: Rob S. <sa...@ph...> - 2008-03-24 16:21:56
|
Yes, this would be a great idea. In some of my past programs, I've done that clumsy workaround ("a separate scene for each view, and copy each object into all of them,...") that you have suggested. In fact, my workaround raised the bug(?)/feature of copyobjects() in an earlier version of VPython. Here are some ideas where multiple-views of the same scene would be useful: - a zoomed-in view akin to a magnifying glass over the scene - top-view vs. side-views (as seen in engineering graphics) - different reference frames for two-body collisions, for inertial-vs-noninertial viewpoints, and for other relativistic situations [these are merely "camera" transformations] - alternate representations: spatial-vs-spacetime viewpoints [the spatial one being a "projection" of the spacetime one] It seems this multiple-viewpoint feature would require fewer Python objects and less bookkeeping of these objects... as well as be more faithfully representative of the idea that one physical situation is being viewed from different perspectives. rob salgado |
From: Symion <sy...@pr...> - 2008-03-24 15:12:45
|
Hi there. Here is a short python program that draws a simple face with roving eyes. As you right mouse the image, the eyes follow you. Change the position of the eyes with the cursor keys. Next step is to develop a topographic head with moving eyelids and eyebrows, then a little more work on the mouth and hey presto - A robotic head! Demonstrates how easy Vpython is to use. My Wish List: Figure out how to use the *scene.lights* function, so that orbiting objects are illuminated from a single source. i.e. Planets orbiting the Sun must change the angle of illumination. I've tried a few ideas but so far nothing works! Does anyone have a solution? Cheers Symion from __future__ import division from visual import * from random import * print '''Crazy Eyeballs -(c) Symion 2008 Use cursor keys to control eye position and width''' class eyeball: def __init__(self,p=(0,0,0),r=1.0,c=[(1,0,0)]*6,a=(0,1,0)): self.pos=p self.radius=r self.color=c self.axis=a self.eye=frame() sphere(frame=self.eye,pos=p,radius=r,axis=a,color=c[0]) for a in range(1,6): sphere(frame=self.eye,pos=vector(scene.objects[-1].pos.x+scene.objects[-1].radius/1.618,scene.objects[-1].pos.y,scene.objects[-1].pos.z),radius=scene.objects[-1].radius/1.618,color=c[a]) def look(self,k=True,s=1.0): if k==True and s!=0: self.eye.rotate(angle=((2*pi)/s)) self.eye.axis=(scene.mouse.camera-self.eye.pos) ## d=[(3,3,3)] for a in range(1,5): d.append((uniform(0,1),uniform(0,1),uniform(0,1))) d.append((0,0,0)) ## Initialize Display scene.autoscale=0 scene.title='Crazy EyeBalls - (c) 2008 Symion' scene.background=(0,0.1,0.2) scene.ambient=0.5 ## Begin eyesize=1.4 lefteye=eyeball(p=(0,0,0),r=eyesize,a=(1,0,0),c=d) rhyteye=eyeball(p=(0,0,0),r=eyesize,a=(1,0,0),c=d) ## Draw Face - Eyebrows box(pos=(0,5,-3),length=4,width=1,height=1,axis=(-1,-1,2),color=(0.4,0.4,0.4)) obj=scene.objects box(pos=vector(obj[-1].pos.x+1.5,obj[-1].pos.y,obj[-1].pos.z-3),length=3,width=1,height=1,axis=(-1,1,2),color=(0.4,0.4,0.4)) box(pos=(0,5,3),length=4,width=1,height=1,axis=(1,1,2),color=(0.4,0.4,0.4)) obj=scene.objects box(pos=vector(obj[-1].pos.x+1.5,obj[-1].pos.y,obj[-1].pos.z+3),length=3,width=1,height=1,axis=(1,-1,2),color=(0.4,0.4,0.4)) ## Nose box(pos=vector(-1,0,0),length=5,width=1,height=1,axis=(.5,1,0),color=(1,1,1)) obj=scene.objects box(pos=vector(obj[-1].pos.x-.5,obj[-1].pos.y-1.8,obj[-1].pos.z),length=1,width=3,height=1,axis=(0,1,0),color=(1,1,1)) obj=scene.objects ## Lips box(pos=vector(obj[-1].pos.x,obj[-1].pos.y-3,obj[-1].pos.z),length=.5,width=4,height=.8,color=(1,0,0)) box(pos=vector(obj[-1].pos.x,obj[-1].pos.y-2,obj[-1].pos.z),length=.5,width=5,height=.5,color=(1,0,0)) ## Position Eyes lefteye.eye.pos=(0,2.0,-2.5) rhyteye.eye.pos=(0,2.0, 2.5) ## Select viewing angle scene.forward=vector(14.1868312021088, -3.63010737884212, 0.00013678986975335) scene.range=vector(8,8,8) scene.fov=1 while 1: rate(100) lefteye.look(20) rhyteye.look(20) if scene.kb.keys>0: kb=scene.kb.getkey() if kb=='down': lefteye.eye.pos.y-=0.5 rhyteye.eye.pos.y-=0.5 elif kb=='up': lefteye.eye.pos.y+=0.5 rhyteye.eye.pos.y+=0.5 elif kb=='left': lefteye.eye.pos.z-=0.5 rhyteye.eye.pos.z+=0.5 elif kb=='right': lefteye.eye.pos.z+=0.5 rhyteye.eye.pos.z-=0.5 else: pass else: pass |
From: Tom B. <bo...@gm...> - 2008-03-22 22:21:19
|
In a similar vein, Phun does even more (and work on both windows and linux) - http://www.phun.at/ If you have a jailbroken iphone or ipod touch, there is also iPhysics (which I got via the Installer, so no link here) - but here's a video http://www.youtube.com/watch?v=ssjl_em5Rjk - one of the neat things about iphysics is it has an option to allow external gravity to be used in your simulation - so tilt the iphone and everything rolls/falls/flows that way. On Sat, Mar 22, 2008 at 9:53 AM, Joel Kahn <jj...@ya...> wrote: > For anyone who has not heard about Crayon Physics > yet, here is where you can download it: > > http://www.kloonigames.com/blog/games/crayon > > To me, the most interesting thing about Crayon > Physics is the underlying concept--simple in basic > design, full of creative possibilities in execution. > Instructors who are using VPython to teach programming > might want to show Crayon Physics to their students > and then encourage them to write something in VPython > that expands upon the basic idea; naturally, VPython's > extra power in 3D, mouse/keyboard functions, math > capabilities, &c should open up some extremely > interesting opportunities. > > Joel > > > > > ____________________________________________________________________________________ > Looking for last minute shopping deals? > Find them fast with Yahoo! Search. > http://tools.search.yahoo.com/newsearch/category.php?category=shopping > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > -- Tom Bortels -- bo...@gm... $DO || ! $DO ; try try : command not found |
From: Joel K. <jj...@ya...> - 2008-03-22 16:53:10
|
For anyone who has not heard about Crayon Physics yet, here is where you can download it: http://www.kloonigames.com/blog/games/crayon To me, the most interesting thing about Crayon Physics is the underlying concept--simple in basic design, full of creative possibilities in execution. Instructors who are using VPython to teach programming might want to show Crayon Physics to their students and then encourage them to write something in VPython that expands upon the basic idea; naturally, VPython's extra power in 3D, mouse/keyboard functions, math capabilities, &c should open up some extremely interesting opportunities. Joel ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping |
From: <jer...@in...> - 2008-03-20 17:39:01
|
> Hans-Joachim Gurt wrote: >> I want several windows for viewing the same scene, e.g. >> * 1) zoomed out for overview, and 2) for zooming in, or >> * multiple views e.g. from above/front/right/zoomed. Bruce Sherwood replies: > That's an interesting suggestion, and it might not be very difficult to > implement. Thanks! Actually, when I had my first date with VPython, I told myself, how nice to have *objects*, permitting to do high-level animation, etc., you change the attributes, and the visual avatar modifies itself. And then I got a nasty surprise: why cameras/viewports do not follow this protocol? Well, why? Especially, if - as myself, but our name is Legion, and Bruce S. is therein - for people interested in the simulation of physical systems, having a coherent, uniform approach to entities present within a program is a blessing. Of course, there are priorities of the developers... But perhaps the user community may help. Jerzy Karczmarczuk Caen, France |
From: Bruce S. <Bru...@nc...> - 2008-03-20 15:11:16
|
That's an interesting suggestion, and it might not be very difficult to implement. Thanks! Bruce Sherwood Hans-Joachim Gurt wrote: > Hi, > > I want several windows for viewing the same scene, e.g. > * 1) zoomed out for overview, and 2) for zooming in, or > * multiple views e.g. from above/front/right/zoomed. > > The stereo-option for display does essentially that, > but those views cannot be controlled independent > from each other. > > Is it possible to create multiple windows onto a scene, > other than for sterescopic viewing ? > > A workaround, e.g. a separate scene for each view, and > copy each object into all of them, seems rather clumsy... > > > By(t)e, > HaJo Gurt |
From: Hans-Joachim G. <gu...@gm...> - 2008-03-20 13:10:38
|
Hi, I want several windows for viewing the same scene, e.g. * 1) zoomed out for overview, and 2) for zooming in, or * multiple views e.g. from above/front/right/zoomed. The stereo-option for display does essentially that, but those views cannot be controlled independent from each other. Is it possible to create multiple windows onto a scene, other than for sterescopic viewing ? A workaround, e.g. a separate scene for each view, and copy each object into all of them, seems rather clumsy... By(t)e, HaJo Gurt -- Weeks of coding can save you hours of planning. |
From: chris l. <chr...@sp...> - 2008-03-19 14:09:33
|
>>> visual.version (4, 'beta25') [chris@localhost Desktop]$ uname -a Linux localhost 2.6.17-5mdv #1 SMP Wed Sep 13 14:32:31 EDT 2006 i686 Intel(R) Pentium(R) M processor 1600MHz GNU/Linux The following code for generating a menu item displays the Add text but does not display the menu items unless the button line is uncommented; from visual.controls import * w = 400 d = display(x=w, y= 0, width = w, height=w, range = 1.5) c = controls(x = 0, y = 0, width = w , height = w, range= 60) m1 = menu(pos=(0,0,0), height=7, width=25, text='Add') m1.items.append(('Cube', lambda: addcube())) # specify menu item title and action to perform m1.items.append(('Sphere', lambda: addsphere())) # specify menu item title and action to perform m1.items.append(('Cylinder', lambda: addcylinder())) # specify menu item title and action to perform # bl = button(pos=(40,40), height=10, width=10, text='OK', action=lambda: donowt) while 1: rate(100) c.interact() |
From: Bruce S. <Bru...@nc...> - 2008-03-18 18:13:32
|
Okay, this is specific enough to consider. My guess is that many of these checks would be fabulously expensive and difficult, and much better done by the programmer dealing with particular cases, who knows the specifics of the situation. The possible exception might be your function objectsAt(x,y,z), though I doubt it. The renderer "knows" much less than you imagine it knowing, in order to do 3D graphics in real time. VPython isn't a solid-modeling package nor a ray-tracer. Bruce Sherwood Hans-Joachim Gurt wrote: >>As you know, none of these kinds of checks are currently built into >>Visual. One of the problems is that what you're asking for is not >>very well defined. > > >>>I would like to >>>* check if objects in a scene overlap, >> >>Overlap in the 2D projection on the screen, or overlap in 3D? >> >>>* check if an area in space is empty, >> >>Presumably you mean volume? > > > I meant volume, and overlap in 3D. > > >>>* get a list of objects that occupy a given point or area in space, >> >>Area on the 2D screen? Or volume in the 3D space? > > > I was thinking of a function like objectsAt(0,0,0) that would > return a list of all objects that occupy that point in space. > > > >>>* get the distance between objects >> >>"Distance between objects" is an ill-defined term. >>Shortest distance between any two points in the two objects? > > > The idea was to check if two objects are about to collide. > I realize that this gets more and more difficult with the form > and the velocities of the objects. So probably too hard... > > > >>>E.g. in the demo "bouncing ball", I would like to check >>>if the ball touches/overlaps the floor-object, as opposed >>>to checking a fixed y-value for reversing the motion. >> >>Note that in "stars.py" there is such a check, a check to see >>whether the center-to-center distance of two stars is less than >>the sum of the two radii of the two stars. > > > Ok, that is another example for the user doing the 'housekeeping'. > I was thinking that the infos about all the objects in the scene > must be available to the renderer, and could somehow be queried. > > > >>>The empty-check would be useful for automatic placing of labels >>>(e.g. by varying the offsets if an area is occupied), >>>so that they don't overlap curves/objects/other labels. >> >>maybe you're most interested in area on the 2D projection. > > > I had the gcurve-example in mind. There the problem is reduced to 2D. > For placing readable, non-overlapping labels, checking their area on > the 2D projection on the screen would be enough (if that can be done > more easily). > > But if you want, for example, fill a volume with objects such as > in the randombox-demo, (but also with other things than just boxes) > and check that those objects don't overlap, a 3D-check would be needed. > > > Regards, > HaJo Gurt |
From: Hans-Joachim G. <gu...@gm...> - 2008-03-18 04:17:00
|
>As you know, none of these kinds of checks are currently built into >Visual. One of the problems is that what you're asking for is not >very well defined. >> I would like to >> * check if objects in a scene overlap, >Overlap in the 2D projection on the screen, or overlap in 3D? >> * check if an area in space is empty, >Presumably you mean volume? I meant volume, and overlap in 3D. >> * get a list of objects that occupy a given point or area in space, >Area on the 2D screen? Or volume in the 3D space? I was thinking of a function like objectsAt(0,0,0) that would return a list of all objects that occupy that point in space. >> * get the distance between objects >"Distance between objects" is an ill-defined term. >Shortest distance between any two points in the two objects? The idea was to check if two objects are about to collide. I realize that this gets more and more difficult with the form and the velocities of the objects. So probably too hard... >> E.g. in the demo "bouncing ball", I would like to check >> if the ball touches/overlaps the floor-object, as opposed >> to checking a fixed y-value for reversing the motion. >Note that in "stars.py" there is such a check, a check to see >whether the center-to-center distance of two stars is less than >the sum of the two radii of the two stars. Ok, that is another example for the user doing the 'housekeeping'. I was thinking that the infos about all the objects in the scene must be available to the renderer, and could somehow be queried. >> The empty-check would be useful for automatic placing of labels >> (e.g. by varying the offsets if an area is occupied), >> so that they don't overlap curves/objects/other labels. >maybe you're most interested in area on the 2D projection. I had the gcurve-example in mind. There the problem is reduced to 2D. For placing readable, non-overlapping labels, checking their area on the 2D projection on the screen would be enough (if that can be done more easily). But if you want, for example, fill a volume with objects such as in the randombox-demo, (but also with other things than just boxes) and check that those objects don't overlap, a 3D-check would be needed. Regards, HaJo Gurt -- Experience is what you get when you don't get what you want. |
From: Bruce S. <Bru...@nc...> - 2008-03-18 02:17:39
|
As you know, none of these kinds of checks are currently built into Visual. One of the problems is that what you're asking for is not very well defined. My guess is that many of the things you're asking for are highly context-specific and not easily incorporated into a general scheme. See further comments below: Hans-Joachim Gurt wrote: > Hello, > > I would like to > * check if objects in a scene overlap, Overlap in the 2D projection on the screen, or overlap in 3D? > * check if an area in space is empty, Presumably you mean volume? Or do you in fact mean an area in the 2D projection on the screen? > * get a list of objects that occupy a given point or area in space, Area on the 2D screen? Or volume in the 3D space? > * get the distance between objects "Distance between objects" is an ill-defined term. Do you mean center-to-center? Shortest distance between any two points in the two objects? > > E.g. in the demo "bouncing ball", I would like to check > if the ball touches/overlaps the floor-object, as opposed > to checking a fixed y-value for reversing the motion. Note that in "stars.py" there is such a check, a check to see whether the center-to-center distance of two stars is less than the sum of the two radii of the two stars. > > The empty-check would be useful for automatic placing of labels > (e.g. by varying the offsets if an area is occupied), > so that they don't overlap curves/objects/other labels. This sounds like maybe you're most interested in area on the 2D projection. > > > There was an example for collision-check in this mailinglist > in 2006-04, but that did its own housekeeping of objects. > > > > Regards, > HaJo Gurt |
From: Hans-Joachim G. <gu...@gm...> - 2008-03-18 00:54:49
|
Hello, I would like to * check if objects in a scene overlap, * check if an area in space is empty, * get a list of objects that occupy a given point or area in space, * get the distance between objects E.g. in the demo "bouncing ball", I would like to check if the ball touches/overlaps the floor-object, as opposed to checking a fixed y-value for reversing the motion. The empty-check would be useful for automatic placing of labels (e.g. by varying the offsets if an area is occupied), so that they don't overlap curves/objects/other labels. There was an example for collision-check in this mailinglist in 2006-04, but that did its own housekeeping of objects. Regards, HaJo Gurt -- UNIX is user friendly. It's just selective who the friends are. |
From: Bruce S. <Bru...@nc...> - 2008-03-17 20:34:08
|
Not sure what you're looking for in VPython that isn't already there. Points can already be expressed as small spheres (and there's a "points" object in the beta version, Visual 4), spheres are of course available, and a line is just a two-point curve object (or a thin cylinder). Maybe it is "plane" that is missing? You can make a plane either as a thin box object, or using the faces object. Can you be more specific about your needs? Bruce Sherwood Joe Chen wrote: > Hi : > I am a high school teacher in Taiwan, > I always look for mathware in teaching , > and I think GeoGebra is a good one for both students and teachers, > most of the important, it is free, but it just draws 2D graph. > somebody suggests GeoGebra 3D, or PyGeo , but I think the drawing > functions are not good enough, and there is no one maintaining them, > > So I think is it possible to improve vpython's functions , or to > provide more math object in later edition , thereafter vpython is a > good freeware for learning both physics and 3D mathematics. > > In high school 3D math course, we just want to put some math objects > like Points, Lines, Planes,Spheres on somewhere in the space, if you > could provide the instructions in the future, I think vpython would be > a nice drawing software forever. > best regards > > Joe > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: Joe C. <joj...@gm...> - 2008-03-17 04:06:42
|
Hi : I am a high school teacher in Taiwan, I always look for mathware in teaching , and I think GeoGebra is a good one for both students and teachers, most of the important, it is free, but it just draws 2D graph. somebody suggests GeoGebra 3D, or PyGeo , but I think the drawing functions are not good enough, and there is no one maintaining them, So I think is it possible to improve vpython's functions , or to provide more math object in later edition , thereafter vpython is a good freeware for learning both physics and 3D mathematics. In high school 3D math course, we just want to put some math objects like Points, Lines, Planes,Spheres on somewhere in the space, if you could provide the instructions in the future, I think vpython would be a nice drawing software forever. best regards Joe |
From: Bruce S. <Bru...@nc...> - 2008-03-10 18:37:32
|
To compile Visual 4 beta on Ubuntu 7.10 one needs the missing package gtkglextmm, which can be difficult to build from source. The binaries are now available in the "For developers" section of vpython.org. (But note that at the moment the newest source files for Visual 4 in CVS don't build properly due to work in progress on a new approach to handling mouse events. Visual 4 beta tarballs available at sourceforge should however build okay.) Bruce Sherwood |
From: Bruce S. <Bru...@nc...> - 2008-03-08 23:42:00
|
Technical note for the technically interested, related to the intent to eliminate dependence on the GTK libraries for Windows and Mac: GTK is a library for the C language for creating windows and handling events, especially on Linux. GTKMM is a "wrapper" of GTK for use by C++ programs. Because there exist Windows versions of these libraries (and Mac versions for the Unix-based X11 windowing system, as distinct from the native Quartz graphics), Jonathan Brandmeyer originally wanted to use GTKMM for Windows as well as Linux, and for X11 on the Mac, as this would mean that one set of code would work on all platforms. However, shortly before he left the project, he came to the realization that it was so incredibly difficult to install GTKMM libraries on Windows that few developers would ever be able to build Visual on Windows. For that reason he rapidly wrote a Windows-specific module for creating a window and handling mouse and keyboard events. The beta version of Visual 4 seemed to be significantly more buggy on Windows than on Linux, so when I started working on Visual this past fall I made the attempt to go back to using GTKMM, with the thought that perhaps the problem was with the Windows-specific code which Jonathan had created at the last minute. As it happens, his Windows-specific code seems basically fine, but this was masked by a variety of other problems which happened to be more visible on Windows than on Linux, which I worked on, one after another, as slowly the beta version worked better and better on Windows. I went through enormous difficulties, with blood all over the floor, to create a GTKMM build environment on Windows. This hair-raising tale is told in an article that you can read in the section "For developers" at vpython.org. When David Scherer recently became interested in working on Visual again, he quite sensibly reacted in horror to the great complexity of the gtkmm build environment on Windows and proposed going back to using Windows-specific code. Having seen that many of the supposedly Windows-specific problems with Visual 4 were independent of the Windows-specific code (which I wasn't using), I was quite willing to agree that we should try abandoning the gtkmm approach on Windows. The non-gtkmm version seems to work as well or better than the gtkmm-based version, and it is far less complex. It can be easily compiled using Microsoft Visual Studio (and there is a free version of this available from Microsoft). Moral of the story: Good people have volunteered a lot of time to the attempt to create an open-source cross-platform windowing system to support cross-platform graphics-oriented programs. Nevertheless, the existing gtkmm environment is off-scale complex, large, fragmented, inadequately documented, and incomplete on some platforms. It started on Linux, where it is the workhorse. But the ports to Windows and Mac are just plain too hard to use. Bruce Sherwood |
From: Kadir H. <kha...@ya...> - 2008-03-08 21:12:17
|
Hello Bruce, I may be asking for too much, but since you are about to make a major architectural change: 1.) Will the new architecture be more generic in terms of texture and transparancy support, i.e., not only specific bodies like cubes and spheres supported, but all sorts of "faces" supported. 2.) Will the new lighting architecture will allow for "shadow", may be in the future, if not now. I realise these require real major effort, I just wanted to see how radical are the new changes. Thanks for your efforts. Kadir ----- Original Message ---- From: Bruce Sherwood <Bru...@nc...> To: vpusers <vis...@li...> Sent: Saturday, March 8, 2008 8:50:18 PM Subject: [Visualpython-users] Upcoming changes to Visual-4 Beta A major redesign for Visual-4 Beta is underway. The central goal of the new design is to create an architecture which is more robust, easier to maintain and to extend, and easier to install and to use. The principal architects are David Scherer and Bruce Sherwood. Steve Spicklemire and Ruth Chabay have also been involved in discussions. As a result, a number of changes to the current beta version are likely: Support for textures will change. Rather than creating a texture bitmap, a programmer will be able to specify a material (such as wood). Transparency will be supported. At this point it is unclear exactly what support there will be for bitmapped images; they may be supported only as "decals" which can be applied to flat surfaces. Lighting options may change; it is likely that spotlights will not be supported at first in this version. You can look forward to higher-quality rendering of scenes on computers with modern graphics cards. A Macintosh version which does not require X11 or Fink will be created. Both the Windows version and the Mac version will no longer depend on the large GTK libraries, which will however still be the foundation for Linux. Bruce Sherwood ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs |
From: Bruce S. <Bru...@nc...> - 2008-03-08 18:50:17
|
A major redesign for Visual-4 Beta is underway. The central goal of the new design is to create an architecture which is more robust, easier to maintain and to extend, and easier to install and to use. The principal architects are David Scherer and Bruce Sherwood. Steve Spicklemire and Ruth Chabay have also been involved in discussions. As a result, a number of changes to the current beta version are likely: Support for textures will change. Rather than creating a texture bitmap, a programmer will be able to specify a material (such as wood). Transparency will be supported. At this point it is unclear exactly what support there will be for bitmapped images; they may be supported only as "decals" which can be applied to flat surfaces. Lighting options may change; it is likely that spotlights will not be supported at first in this version. You can look forward to higher-quality rendering of scenes on computers with modern graphics cards. A Macintosh version which does not require X11 or Fink will be created. Both the Windows version and the Mac version will no longer depend on the large GTK libraries, which will however still be the foundation for Linux. Bruce Sherwood |