From: Kadir H. <kha...@ya...> - 2008-05-26 08:55:56
|
Sorry, forgot the cc for the group. ----- Forwarded Message ---- From: Kadir Haldenbilen <kha...@ya...> To: Bruce Sherwood <Bru...@nc...> Sent: Monday, May 26, 2008 11:54:31 AM Subject: Re: [Visualpython-users] MULTIPLE WINDOWS FOR A SCENE: Just a little thought Just a matter of curiosity... With the extended capabilities of the FRAME, it now runs even better in V4 with some very little modification. ------------------------- from time import time as _time, sleep as _sleep from visual import * scene1 = display( title = "CUBE 1 - Scene 1" , x=20, y=20, width=300, height=300) scene1.autoscale = 0 scene1.range = (2,2,2) rframe = frame(pos=(0,0,0)) rod = box( frame =rframe, pos=(0,0,0), size=(1,1,1), color=color.blue ) c1 = cylinder(frame=rframe, pos=(0.0,0.5,0), radius=0.4, axis=(0,0.1,0), color=color.red) c2 = cylinder(frame=rframe, pos=(0.0,0,0.5), radius=0.4, axis=(0,0,0.1), color=color.yellow) c3 = cylinder(frame=rframe, pos=(-0.5,0,0.0), radius=0.4, axis=(-0.1,0,0), color=color.green) scene2 = display( title = "CUBE 1 - Scene 2" , x=420, y=20, width=300, height=300) scene2.autoscale = 0 scene2.range = (2,2,2) scene2.forward = (1,-1,0) pi = 3.141592653589793 while 1: scene1.select() rframe.display = display.get_selected() time.sleep(0.01) scene2.select() rframe.display = display.get_selected() time.sleep(0.01) rframe.rotate(axis=(1,0,0), angle=pi/60) ----- Original Message ---- From: Bruce Sherwood <Bru...@nc...> To: Kadir Haldenbilen <kha...@ya...> Cc: vis...@li... Sent: Monday, May 26, 2008 5:09:15 AM Subject: Re: [Visualpython-users] MULTIPLE WINDOWS FOR A SCENE: Just a little thought I'm not sure what you're trying to achieve. I should comment that this won't actually work in Visual 4 because you can't transfer something in a frame in one window to a different window, because in Visual 4 a frame is more fully a container. For example, you can make a frame visible or invisible. Bruce Sherwood Kadir Haldenbilen wrote: I know it looks clumsy and may need some double coding, but it may give some of you some thought to develop it further... Kadir ------------------------------- from time import time as _time, sleep as _sleep from visual import * scene1 = display( title = "CUBE 1 - Scene 1" , x=20, y=20, width=300, height=300) scene1.autoscale = 0 scene1.range = (2,2,2) rframe = frame(pos=(0,0,0)) rod = box( frame =rframe, pos=(0,0,0), size=(1,1,1), color=color.blue ) c1 = cylinder(frame=rframe, pos=(0.0,0.5,0), radius=0.4, axis=(0,0.1,0), color=color.red) c2 = cylinder(frame=rframe, pos=(0.0,0,0.5), radius=0.4, axis=(0,0,0.1), color=color.yellow) scene2 = display( title = "CUBE 1 - Scene 2" , x=420, y=20, width=300, height=300) scene2.autoscale = 0 scene2.range = (2,2,2) scene2.forward = (1,-1,0) pi = 3.141592653589793 while 1: rod.display = scene1 c1.display = scene1 c2.display = scene1 time.sleep(0.01) rod.display = scene2 c1.display = scene2 c2.display = scene2 time.sleep(0.01) rframe.rotate(axis=(1,0,0), angle=pi/60) ________________________________ ------------------------------------------------------------------------- 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 |