Figuras en 3D de compañeros
*****Octaedro de Cynthia***** Información de la figura en el blog de Cynthia Código import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * verticies = ( (1, -1, 0), (1, 1, 0), (-1, 1, 0), (-1, -1, 0), (0, 0, 1.5), (0, 0, -1.5), ) edges = ( (5, 0), (5, 1), (5, 2), (5, 3), (4,0), (4,1), (4,2), (4,3), (0,1), (0,3), (2,1), (2,3), ) def Cube(): glBegin(GL_LINES) for edge in edges: for vertex in edge: glVertex3fv(verticies[vertex]) glEnd() def main(): pygame.init() display = (800,600) pygame.display.set_mode(display, DOUBLEBUF|OPENGL) gluPerspective(45, (display[0]/display[1]), 0.1, 50.0) glTranslatef(0.0,0.0, -5) while True: for event in pygame.event.get(): if event.type == pygame.QUIT: pygame.quit() quit() glRotatef(1, 3, 1, 1) glColor