Esempio n. 1
0
import pyscovil, time, random

curent_options = pyscovil.options(640, 480, 32, False, True, "test", "Test")
scene_object = pyscovil.scene()

dots = []
for i in xrange(1000):
	cords =  [random.uniform(1, 4)-2, random.uniform(1, 4)-2, -3]
	dots.append(pyscovil.dot(scene_object, cords, int(random.uniform(2, 6))))


#time.sleep(2)

#for i in xrange(1000):
#	dots[i].set_cord([dots[i].cord[0]-random.random()+0.5, dots[i].cord[1]-random.random()+0.5, dots[i].cord[2]])

#time.sleep(5)

#for i in xrange(500):
#	scene_object.delete_lower(dots[0], True)
#	dots.pop(0)
time.sleep(10)
Esempio n. 2
0
import pyscovil, time

curent_options = pyscovil.options(640, 480, 32, False, True, "PyExample3", "Test")
#curent_options.fps_limit(30)
scene_object = pyscovil.scene()

camera1 = pyscovil.camera()
camera1.look_at([-1,0.5,2], [0,0,-1], [0,1,0])
camera1.set_current(True)

dot1 = pyscovil.dot(scene_object)



quad1 = pyscovil.quad(dot1)
quad1.set_mat_cord([0,0, 0])
quad1.set_direction([0, 1, 0, 90], True)
quad2 = pyscovil.quad(dot1)
quad2.set_mat_cord([1,0, 0])
quad2.set_direction([0, 1, 0, 90], True)

quad3 = pyscovil.quad(dot1)
quad3.set_mat_cord([0,0, -1])
quad3.set_direction([1, 0, 0, 90], True)
quad4 = pyscovil.quad(dot1)
quad4.set_mat_cord([0,1, -1])
quad4.set_direction([1, 0, 0, 90], True)

quad5 = pyscovil.quad(dot1)
quad5.set_mat_cord([0,0, -1], True)