View Single Post
  #7  
Old 08-02-2016, 09:11 AM
haohaoxuexi1 haohaoxuexi1 is offline
Member
 
Join Date: Sep 2015
Posts: 81
Quote:
Originally Posted by Jeff View Post
Yes, once you create the line you can move it like any other object:

Code:
import viz
import vizshape

viz.go()

viz.clearcolor(viz.SLATE)
vizshape.addGrid()

viz.startLayer(viz.LINES) 
viz.vertex(0,0,0)  
viz.vertex(0,1,0) 
line = viz.endLayer() 

line.setPosition([2,0,7])
line.color(viz.RED)
Is there a way to change the position of line only by change the vertex of it?

In the code you gave to me, the length of the line is fixed, is that possible to get a line which will change its length according to the position of vertex?
Reply With Quote