PDA

View Full Version : Draw a triangle instead of a point


Chrissy2009
07-21-2009, 08:49 AM
Hi,

how can I draw a traingle at the end of my line, instead of points?

I've done this:


viz.startlayer(viz.LINES)
viz.linewidth(5)
viz.vertexcolor(viz.RED)
viz.vertex(punkt1)
viz.vertex(punkt2)
viz.startlayer(viz.POINTS)
viz.pointsize(10)
viz.vertex(punkt2)

vec = viz.endlayer()

Is there a possibility to draw triangles instead of points?

farshizzo
07-21-2009, 09:46 AM
Instead of using viz.POINTS you can use viz.TRIANGLES and specify the position of each vertex. Example:viz.startlayer(viz.TRIANGLES)
viz.vertex(p1)
viz.vertex(p2)
viz.vertex(p3)
.
.
.