PDA

View Full Version : how to draw a single point


aaaa
11-13-2014, 04:24 PM
Excuse me, the code bellow can't draw a single dot:

import viz
viz.go()
viz.startLayer(viz.POINTS)
viz.vertex(0,1.8,1)
viz.endLayer()

the code bellow can draw two points:

import viz
viz.go()
viz.startLayer(viz.POINTS)
viz.vertex(0,1.8,1)
viz.vertex(0,1.7,1)
viz.endLayer()


My problem is how to draw a single dot.

farshizzo
11-13-2014, 05:48 PM
You will need to disable culling on the object, since a single point will result in a infinitely small bounding box. Try the following code:
import viz
viz.go()
viz.startLayer(viz.POINTS)
viz.vertex(0,1.8,1)
points = viz.endLayer()
points.disable(viz.CULLING)

aaaa
11-17-2014, 01:26 AM
Thanks very much