From: Bruce S. <Bru...@nc...> - 2008-11-19 23:34:11
|
It's a subtle geometry issue having to do with a discontinuity at the scene.up direction. I confess I've never fully wrapped my head around the problem. It's more a feature than a bug, in that I don't know a way around this within the Visual framework, and it's not getting "fixed" even in Visual 5 (about to be released). Bruce rsa...@mt... wrote: > On Windows XP SP3 (Python 2.5.1, VPython 3.2.11), the following use of > frame() gives an unexpected flip in the y- and z-axes in some of the > frames. > > By uncommenting the line: > if costh<0: Fup=-Fup > I get the desired behavior. > > Is this a bug? > > Rob Salgado > > > # example of frame() > > from visual import * > > scene.background=(.5,.5,.5) > scene.forward=(0,20,-10) > > DEG=math.pi/180. > F=[] > > for th in arange(0,360*DEG, 30*DEG): > costh=cos(th) > sinth=sin(th) > > Fup=scene.up > #if costh<0: Fup=-Fup > > F.append(frame(pos=6*norm( vector(costh, sinth, 0) ), > axis=vector(costh,sinth,0) , up=Fup)) > > arrow(frame=F[-1],color=color.red, axis=vector(1,0,0) ) > arrow(frame=F[-1],color=color.green, axis=vector(0,1,0) ) > arrow(frame=F[-1],color=color.blue, axis=vector(0,0,1) ) > label(frame=F[-1],text="%3d" % round(th/DEG) ,box=0, opacity=0) > > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users |