My projects: SUGG (M), SYNONS, URLS, SIMILAR, Misc: 3Dengine, UniteHowTo, FliCC, TripIdeas, My blog.
Old/abandoned: TheRarestWords (TcCrnch).
Hi, I'm Slava V. and I develop those projects in free time.
To main page |

Random Lines (PyOpenGL)

This is a testing computationally expensive function (it should take a second or two to run, this was written to demonstrate CallList PyOpenGL Class):
import random
def random_lines():
	print "random_lines called"
	i = 0.
	for i in range(100*1000):
		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 )