lilio
07-17-2009, 02:34 AM
Hello,
how can I turn my drawn layer around the y-axis?
viz.startlayer(viz.LINES)
viz.linewidth(3)
viz.vertexcolor(viz.RED)
viz.vertex(2,3,5)
viz.vertex(-1,2,9)
viz.startlayer(viz.POINTS)
viz.pointsize(10)
viz.vertex(2,3,5)
viz.vertex(-1,2,9)
vec1 = viz.endlayer()
And now I want to turn this line around the y-axis for an special amount.
I've tested this:
def keyboardAction(key):
if viz.key.isDown('1'):
vec1.addAction(vizact.spin(0,1,0, 10))
viz.callback(viz.KEYDOWN_EVENT,keyboardAction)
But that's not what I want.
I want to turn the line around the y-axis, but one point should be fixed. So only the second point of the line should turn around.
That it looks like one point is fixed and the other point of the line turns around the fixed point.
For example: I draw this line and if I push the key '1' then the second point turns about 10 degree around the y-axis.
Is this possible?
how can I turn my drawn layer around the y-axis?
viz.startlayer(viz.LINES)
viz.linewidth(3)
viz.vertexcolor(viz.RED)
viz.vertex(2,3,5)
viz.vertex(-1,2,9)
viz.startlayer(viz.POINTS)
viz.pointsize(10)
viz.vertex(2,3,5)
viz.vertex(-1,2,9)
vec1 = viz.endlayer()
And now I want to turn this line around the y-axis for an special amount.
I've tested this:
def keyboardAction(key):
if viz.key.isDown('1'):
vec1.addAction(vizact.spin(0,1,0, 10))
viz.callback(viz.KEYDOWN_EVENT,keyboardAction)
But that's not what I want.
I want to turn the line around the y-axis, but one point should be fixed. So only the second point of the line should turn around.
That it looks like one point is fixed and the other point of the line turns around the fixed point.
For example: I draw this line and if I push the key '1' then the second point turns about 10 degree around the y-axis.
Is this possible?