Figuras básicas en python(3D)
PROGRAMA 1: Gráficas sencillas en 3D. from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt fig = plt.figure() ax1 = fig.add_subplot(111, projection='3d') xpos = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15] ypos = [2,3,4,5,1,6,2,1,7,2,3,5,1,3,2] num_elements = len(xpos) zpos = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0] dx = 1 dy =1 dz = [20,2,3,4,5,6,7,8,9,10,11,12,13,14,15] ax1.bar3d(xpos, ypos, zpos, dx, dy, dz, color='red') plt.show() PROGRAMA 2:Cubo básico en 3D. import pygame from pygame.locals import * from OpenGL.GL import * from OpenGL.GLU import * verticies = ( (1, -1, -1), (1, 1, -1), (-1, 1, -1), (-1, -1, -1), (1, -1, 1), (1, 1, 1), (-1, -1, 1), (-1, 1, 1) ) edges = ( (0,1), (0,3), (0,4), (2,1), (2,3), (2,7), (6,3), (6,4), (6,7), (5,1), (5,4), (5,7) ) def Cube(): glBegin(GL_LINES) for edge in edges: for vertex in edge: glVertex3...