All pastes #739577 Raw Edit

Someone

public python v1 · immutable
·published 2007-10-17 09:12 UTC
rendered paste body
try:    import psyco    psyco.full()except ImportError:    print 'No psyco? Sad panda mode initiated.'from PyScene.Backends.OpenGL import Cube, Scene, Transformfrom PyScene import Colorfrom pyglet import clockscene = Scene(640, 480)colors = []colors.append(Color(1.0, 0.0, 0.0))colors.append(Color(0.0, 1.0, 0.0))colors.append(Color(0.0, 0.0, 1.0))colors.append(Color(1.0, 1.0, 0.0))colors.append(Color(1.0, 0.0, 1.0))colors.append(Color(0.0, 1.0, 1.0))cube = Cube(colors=colors)locs = [    (-1.75, 0.0, -5.0),    (1.75, 0.0, -5.0),    (0.0, 1.5, -5.0),    (0.0, -1.5, -5.0),    (0.0, 0.0, -6.5),]neg = 1.0for loc in locs:    trans = Transform(                  trans=loc,                  rot=(0.0, neg*30.0, neg*15.0, neg*15.0)            )    trans.append(cube)    scene.append(trans)    neg *= -1.0while True:    scene.children.rotate(clock.tick() * 120.0)    scene.render()