WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Draw a triangle instead of a point (https://forum.worldviz.com/showthread.php?t=2173)

Chrissy2009 07-21-2009 08:49 AM

Draw a triangle instead of a point
 
Hi,

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

I've done this:

Code:

                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:
Code:

viz.startlayer(viz.TRIANGLES)               
viz.vertex(p1)
viz.vertex(p2)
viz.vertex(p3)
.
.
.



All times are GMT -7. The time now is 01:45 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC