From: alessandro <bom...@gm...> - 2009-04-18 18:10:34
|
I create 3 icons in my prog.: Top.view Front-view Side-view I change the forward attribute of my scene (named scena1). I set scena1.up = vector (0,0,1) and define 3 func: def vista_alto(obj): global scena1 scena1.forward = vector(0,0,-1) def vista_fronte(obj): global scena1 scena1.forward = vector(0,-1,0) def vista_lato(obj): global scena1 scena1.forward = vector(-1,0,0) but when click on the top-view (1° def) an error appears: *scena1.forward = vector(-1,0,0) ValueError: forward may not be colinear with up.* Reading the documentation I found this requirement but I'm not able to solve it. How can I do? Alessandro Barracco |
From: Bruce S. <Bru...@nc...> - 2009-04-18 20:18:17
|
If you're willing to use the newer Visual 5, this problem has been fixed. There is no way in Visual 3 around this other than never to point the camera exactly in the direction of up or -up. (The fix in Visual 5 is quite technical: It consists of adjusting scene.forward whenever it is exactly in the direction of scene.up or -scene.up to point in a slightly different direction as far as the view is concerned, and the human viewer doesn't notice.) Bruce Sherwood alessandro wrote: > I create 3 icons in my prog.: > > Top.view > Front-view > Side-view > > I change the forward attribute of my scene (named scena1). I set > scena1.up = vector (0,0,1) and define 3 func: > > def vista_alto(obj): > global scena1 > scena1.forward = vector(0,0,-1) > > def vista_fronte(obj): > global scena1 > scena1.forward = vector(0,-1,0) > > def vista_lato(obj): > global scena1 > scena1.forward = vector(-1,0,0) > > but when click on the top-view (1° def) an error appears: > > *scena1.forward = vector(-1,0,0) > ValueError: forward may not be colinear with up.* > > Reading the documentation I found this requirement but I'm not able to > solve it. How can I do? > > Alessandro Barracco > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > > > ------------------------------------------------------------------------ > > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |
From: alessandro <bom...@gm...> - 2009-04-19 09:06:33
|
OK. So the only way is to use Visual 5? I need some help installing Visual 5 on Ubuntu Hardy. I've tried to install the package made by Guy K. Kloss here https://gutefee.massey.ac.nz/moin/Python/3D but when I use in my prog. it doesn't work. I'm using pygtk and glade building my app. I have this func main: def main(): global scena1 # my scene global griglia global nomefile app.signal_autoconnect(dic) gui_main.show() gui_main.move(0,0) scena1 = disegno.nuovo() # call to my drawing -module disegno.xyz(100) # here I draw 3 arrow (my xyz axis) griglia = 2000 step=100 disegno.base(-griglia,-griglia,griglia,griglia,step,True) # here I draw a grid (my ground plane) gtk.main() Running the app must appear 3 wins: my main win, a second win (the option) and the Visual win (with the grid and the 3 arrow). But everything seems to be "freezed". with Visual 3 it work fine. I think there is something wrong with the gtk.main Alessandro Barracco Bruce Sherwood ha scritto: > If you're willing to use the newer Visual 5, this problem has been > fixed. There is no way in Visual 3 around this other than never to > point the camera exactly in the direction of up or -up. > > (The fix in Visual 5 is quite technical: It consists of adjusting > scene.forward whenever it is exactly in the direction of scene.up or > -scene.up to point in a slightly different direction as far as the > view is concerned, and the human viewer doesn't notice.) > > Bruce Sherwood |
From: Guy K. K. <g....@ma...> - 2009-04-20 00:13:03
|
On Sun, 19 Apr 2009 21:06:07 alessandro wrote: > OK. So the only way is to use Visual 5? I need some help installing > Visual 5 on Ubuntu Hardy. I've tried to install the package made by Guy > K. Kloss here > > https://gutefee.massey.ac.nz/moin/Python/3D > > but when I use in my prog. it doesn't work. I must say that I didn't extensively test the package for Hardy, and the (former) Hardy box now is running Jaunty. So I can't go back and verify. But the packages were installed using checkinstall, therefore no dependencies should be listed inside the .deb package, and you're on your own installing them. What I would suggest is this: * Install the python-visual 3 package (from your distribution) to pull in most dependencies * remove that package again * install the new python-visual 5 package provided from my wiki (URL above) * run some samples See if the samples will work. If not, check the error message(s) you may get on the console to figure out what other package might be missing and needs installing. HTH, Guy -- Guy K. Kloss Institute of Information and Mathematical Sciences Te Kura Pūtaiao o Mōhiohio me Pāngarau Room 2.63, Quad Block A Building Massey University, Auckland, Albany Private Bag 102 904, North Shore Mail Centre voice: +64 9 414-0800 ext. 9585 fax: +64 9 441-8181 eMail: G....@ma... http://iims.massey.ac.nz |
From: Bruce S. <Bru...@nc...> - 2009-04-20 01:03:19
|
I'm wouldn't think that it's useful to pick up dependencies from Visual 3, which for Linux was based on the old GTK, not the current GTK+ on which Visual 5 is based. But it seemed like he was able to build Visual 5; the problem was that it wouldn't run within the larger framework he was trying to use. Evidently he wasn't trying simply to run a VPython program (though now that I think of it, it would be useful to know whether a simple example program would run). If the problem is the build itself, the thing to do is to study carefully the extensive notes in INSTALL.txt, which is included in the Linux tarball available at vpython.org. Bruce Sherwood Guy K. Kloss wrote: > On Sun, 19 Apr 2009 21:06:07 alessandro wrote: >> OK. So the only way is to use Visual 5? I need some help installing >> Visual 5 on Ubuntu Hardy. I've tried to install the package made by Guy >> K. Kloss here >> >> https://gutefee.massey.ac.nz/moin/Python/3D >> >> but when I use in my prog. it doesn't work. > > I must say that I didn't extensively test the package for Hardy, and the > (former) Hardy box now is running Jaunty. So I can't go back and verify. But > the packages were installed using checkinstall, therefore no dependencies > should be listed inside the .deb package, and you're on your own installing > them. > > What I would suggest is this: > > * Install the python-visual 3 package (from your distribution) to pull in most > dependencies > * remove that package again > * install the new python-visual 5 package provided from my wiki (URL above) > * run some samples > > See if the samples will work. If not, check the error message(s) you may get > on the console to figure out what other package might be missing and needs > installing. > > HTH, > > Guy > |
From: Bruce S. <Bru...@nc...> - 2009-04-20 01:11:50
|
My apologies: I shouldn't have said "now that I think of it", as you had already said this! Bruce Sherwood Bruce Sherwood wrote: > I'm wouldn't think that it's useful to pick up dependencies from Visual 3, which > for Linux was based on the old GTK, not the current GTK+ on which Visual 5 is based. > > But it seemed like he was able to build Visual 5; the problem was that it > wouldn't run within the larger framework he was trying to use. Evidently he > wasn't trying simply to run a VPython program (though now that I think of it, it > would be useful to know whether a simple example program would run). > > If the problem is the build itself, the thing to do is to study carefully the > extensive notes in INSTALL.txt, which is included in the Linux tarball available > at vpython.org. > > Bruce Sherwood > > Guy K. Kloss wrote: >> On Sun, 19 Apr 2009 21:06:07 alessandro wrote: >>> OK. So the only way is to use Visual 5? I need some help installing >>> Visual 5 on Ubuntu Hardy. I've tried to install the package made by Guy >>> K. Kloss here >>> >>> https://gutefee.massey.ac.nz/moin/Python/3D >>> >>> but when I use in my prog. it doesn't work. >> I must say that I didn't extensively test the package for Hardy, and the >> (former) Hardy box now is running Jaunty. So I can't go back and verify. But >> the packages were installed using checkinstall, therefore no dependencies >> should be listed inside the .deb package, and you're on your own installing >> them. >> >> What I would suggest is this: >> >> * Install the python-visual 3 package (from your distribution) to pull in most >> dependencies >> * remove that package again >> * install the new python-visual 5 package provided from my wiki (URL above) >> * run some samples >> >> See if the samples will work. If not, check the error message(s) you may get >> on the console to figure out what other package might be missing and needs >> installing. >> >> HTH, >> >> Guy >> > > ------------------------------------------------------------------------------ > Stay on top of everything new and different, both inside and > around Java (TM) technology - register by April 22, and save > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco. > 300 plus technical and hands-on sessions. Register today. > Use priority code J9JMT32. http://p.sf.net/sfu/p > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |