from turtle import *
setup(360, 360, 0, 0)
screensize(330, 330)
title("Figura de Paloma")
pensize(2)
penup()
goto(-32,61)
pendown()
goto(-32,61)
goto(-6,43)
goto(35,12)
goto(58,-4)
goto(89,-13)
goto(91,-22)
goto(79,-28)
goto(103,-46)
goto(32,-20)
goto(16,-17)
goto(-12,-32)
goto(-14,-40)
goto(-3,-44)
goto(-47,-45)
goto(-21,-35)
goto(-15,-25)
goto(-20,-10)
goto(-33,-7)
goto(-63,15)
goto(-69,37)
goto(-63,75)
goto(-69,82)
goto(-82,81)
goto(-65,99)
goto(-48,99)
goto(-42,90)
goto(-32,61)
hideturtle()
done()
2. Canguro
from turtle import *
setup(500, 400, 0, 0)
screensize(400, 350)
title("Figura de Canguro")
pensize(2)
penup()
goto(-30,72)
pendown()
goto(-30,72)
goto(21,79)
goto(26,76)
goto(60,133)
goto(80,137)
goto(66,114)
goto(60,110)
penup()
goto(73,125)
pendown()
goto(73,125)
goto(102,89)
goto(94,78)
goto(62,99)
goto(63,36)
goto(55,2)
goto(57,-16)
goto(39,-3)
goto(24,6)
goto(-4,-17)
goto(-21,-68)
goto(22,-96)
goto(-32,-89)
goto(-39,-73)
goto(-41,-40)
goto(-59,-66)
goto(-237,-17)
goto(-67,-34)
goto(-67,-26)
goto(-30,72)
penup()
goto(13,-4)
pendown()
goto(13,-4)
goto(9,-45)
goto(63,-73)
goto(6,-66)
goto(-7,-49)
goto(-9,-31)
goto(-4,-17)
goto(13,-4)
penup()
goto(79,119)
pendown()
goto(79,119)
goto(84,121)
goto(97,144)
goto(80,137)
goto(73,125)
goto(81,117)
penup()
goto(58,9)
pendown()
goto(58,9)
goto(62,-11)
goto(56,-7)
hideturtle()
done()
3. Mariposa con Ecuaciones paramétricas
from turtle import *
import math
setup(500, 500, 0, 0)
screensize(400, 400)
title("Figura de Mariposa con Ecuaciones parametricas")
colormode(255)
pensize(2)
n=0
colores=["#201815","#584C4C","#3F6E80","#0F4851","#473A68","#201815","#584C4C","#3F6E80","#0F4851","#473A68"]
for t in range(0,3600):
if(t%360==0):
pencolor(colores[n])
n=n+1
t=t*((math.pi)/180)
x = (math.sin(t) * ((math.exp(math.cos(t))) - (2 * math.cos(4*t)) - ((math.sin(t / 12)) ** 5)))*60
y = (math.cos(t) * ((math.exp(math.cos(t))) - (2 * math.cos(4*t)) - ((math.sin(t / 12)) ** 5)))*60
goto(x,y)
hideturtle()
done()
No hay comentarios:
Publicar un comentario