import pyscovil, time curent_options = pyscovil.options(640, 480, 32, False, True, "PyExample3", "Test") scene_object = pyscovil.scene() camera1 = pyscovil.camera() camera1.look_at([0,0,1], [0,0,-1], [0,1,0]) camera1.set_current(True) line1 = pyscovil.line(scene_object, [0,0,0], [1,0,0]) triangle1 = pyscovil.triangle(line1, [0, 0.3, 0], [-0.3, 0, 0], [0.3, 0, 0]) triangle1.set_color1([1,0,0,1]) triangle1.set_color2([0,1,0,1]) triangle1.set_color3([0,0,1,1], True) for i in xrange(90): line1.set_direction([1,0,1,i], True) time.sleep(0.05) for i in xrange(90): camera1.look_at([0,0,1+i/100.0], [0,0,-1], [0,1,0], True) time.sleep(0.05) time.sleep(2)
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)