The PointCloud
object is used to store and display point data.
initialization
PointCloud(vertex_data, color_data)
methods
sprite
sprite(filename)
pointSize
pointSize(size)
draw
draw()
examples
basic point cloud
def init(): vertices = list(random_vertex_generator(1000, -10, 10)) Global.points = PointCloud(vertices) def display(): lighting(False) color(0.0, 1.0, 1.0) Global.points.draw()
point cloud with sprites
def init(): vertices = list(random_vertex_generator(1000, -10, 10)) Global.points = PointCloud(vertices) def gl_init(): Global.points.sprite('data/particle.bmp') def display(): lighting(False) Global.points.draw()
point cloud with color data
def init(): vertices = list(random_vertex_generator(1000, -10, 10)) colors = list(random_color_generator(1000)) Global.points = PointCloud(vertices, colors) def display(): lighting(False) Global.points.pointSize(3.0) Global.points.draw()