import random def random_lines(): print "random_lines called" glBegin(GL_LINES) i = 0. for i in range(100*1000): i+=.1 t = random.uniform(0,3) x = math.sin(i+t*.14) y = math.sin(i*.2+t*.114) z = math.cos(i*.12+t*.114)**2 glColor3f( x,y-x,z*.1 ) glVertex3f( x,y,z ) glEnd()