FIGURA 3D

#-*-coding: utf-8-*-from Tkinter import *

vp=Tk()
vp.title("Cubo")
vp.config(bg="gray")
vp.geometry("500x500")

def ejecutar (f):
    vp.after(200,f)

def r(ventana):
    r=Canvas(width=210,height=210,bg="white")
    r.pack(expand=YES,fil=BOTH)
    r.create_rectangle(100,100,300,300, width=5,fill="red")
    r.create_rectangle(200, 200, 420, 400, width=5, fill="blue")
    r.create_polygon(300, 100, 420, 200, 200,200,100,100, fill='gray',outline='black', width=5)
    r.create_polygon(200, 300, 100, 300, 200, 400,fill='green',outline='black', width=5)
    r.create_line(300,100,300,300,fill='black',width=3,dash=(5, 5))
    r.create_line(300, 300, 100, 300, fill='black', width=3, dash=(5, 5))
    r.create_line(300, 300,420,400, fill='black', width=3, dash=(5, 5))

br=Button(vp,text="Mostrar Cubo", command=lambda:ejecutar(r(vp)))
br.grid(row=1,column=1)

vp.mainloop()

Comentarios

Entradas populares de este blog