From: Bruce S. <bas...@un...> - 2004-01-23 00:44:48
|
The following slightly modified version works fine on my computer (it wa. Since you don't experience the arrow becoming invisible, it is tempting to blame something completely extraneous to VPython, such as your graphics driver. from visual import * sphere(radius=0.05) xaxis=arrow(pos=vector(0, 0, 0), axis=(0, 0, 0), color=color.red, shaftwidth=0.5) xaxis.axis = vector(1, 0, 0) # scene.mouse.getclick() # OPTIONALLY WAIT FOR ARROW TO BECOME INVISIBLE #the vector is now displayed on screen #now i cant seem to hide it xaxis.visible = 0 #hhmm the xaxis is still visible on the screen but is no longer # updated if i change something like position xaxis.pos = vector(3, 0, 0) #lets try to make it invisible by making the axis nothing ##xaxis.axis = vector(0, 0, 0) # THIS DOES MAKE VECTOR INVISIBLE #now reshow the vector, but it never hid it in the first place, shows #up in the position vector(3, 0, 0) xaxis.visible = 1 CHAPMAN, RICHARD wrote: >hi > >im having problems temporarily hiding the arrow drawn on screen the >code goes something like what follows but i added comments on what is >actually happening. any help would be appreciated. > >rich, see code below :-) > >xaxis=arrow(pos=vector(0, 0, 0), axis=(0, 0, 0), color=color.red, >shaftwidth=0.5) > >xaxis.axis = vector(1, 0, 0) > >#the vector is now displayed on screen > >#now i cant seem to hide it >xaxis.visible = 0 > >#hhmm the xaxis is still visible on the screen but is no longer >updated if i change something like position >xaxis.pos = vector(3, 0, 0) > >#lets try to make it invisible by making the axis nothing >xaxis.axis = vector(0, 0, 0) > >#now reshow the vector, but it never hid it in the first place, shows >up in the position vector(3, 0, 0) xaxis.visible = 1 > > > > >------------------------------------------------------- >The SF.Net email is sponsored by EclipseCon 2004 >Premiere Conference on Open Tools Development and Integration >See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. >http://www.eclipsecon.org/osdn >_______________________________________________ >Visualpython-users mailing list >Vis...@li... >https://lists.sourceforge.net/lists/listinfo/visualpython-users > > |