#1
|
|||
|
|||
Why I need two points for viz.startlayer(viz.POINTS)
Hi, I want to show the points as mouse moves, and I program like below:
Code:
def plotGraph(x,y): viz.startlayer(viz.POINTS) viz.pointsize(5) # viz.vertexcolor(viz.RED) # viz.vertex(0,0,0) viz.vertexcolor(viz.BLACK) viz.vertex(x,y,0) line = viz.endlayer(viz.SCREEN) print 'plot',x,y def onMouseMove(e): plotGraph(e.x,e.y) viz.go() viz.clearcolor(viz.SKYBLUE) viz.callback(viz.MOUSE_MOVE_EVENT,onMouseMove) Code:
viz.vertexcolor(viz.RED) viz.vertex(0,0,0) Can anyone tell me why? Is it because startlayer needs at lease two points? Thank you |
Thread Tools | |
Display Modes | Rate This Thread |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Support for Natural Point's Optitrack system | bennovdbogaard | Vizard | 14 | 10-25-2012 06:22 AM |
avatar walking over a sequence of points | IGoudt | Vizard | 1 | 10-16-2009 11:22 AM |
on the fly points | John P | Vizard | 1 | 07-15-2009 05:22 PM |
Draw Line between Points | Chrissy2009 | Vizard | 2 | 05-13-2009 04:42 AM |
Draw Line between Points selected by mouse | Johannes | Vizard | 7 | 01-07-2005 02:50 PM |