python turtle

from turtle import *
import colorsys
tracer(100)
h=0.3
bgcolor('black')
for i in range(190):
c = colorsys.hsv_to_rgb(h,1,1)
fillcolor(c)
h+=0.005
begin_fill()
circle(190-i,90)
lt(90)
lt(20)
circle(190-i,90)
lt(18)
end_fill()
done()


from turtle import *
import colorsys
tracer(100)
h=0.3
bgcolor('black')
for i in range(260):
c = colorsys.hsv_to_rgb(h,1,1)
fillcolor(c)
h+=0.005
begin_fill()
circle(190-i,90)
lt(90)
# lt(20)
circle(190-i,90)
lt(18)
end_fill()
done()

from turtle import *

speed(0)
bgcolor("black")

def spiral(distance):
for i in range(distance):
fd(i)
rt(120)

colors = ["white", "green", "yellow", "purple", "blue", "orange"]
for i in range(6):
color(colors[i % 6])
spiral(200)
rt(60)

hideturtle()

done()


from turtle import *

def suare():
for i in range(2):
fd(400)
lt(90)
fd(250)
lt(90)
color("black")
fillcolor("red")
begin_fill()
suare()
end_fill()
color("grey")
begin_fill()
lt(90)
fd(290)
lt(90)
fd(10)
lt(90)
fd(650)
lt(90)
fd(10)
lt(90)
fd(360)
end_fill()
fd(135)
penup()
rt(90)
fd(140)
pendown()

def draw_star(size):
fillcolor("yellow")
begin_fill()
for _ in range(5):
fd(size * 2.5)
rt(144)
end_fill()
title("Yellow Star")
bgcolor("white")
color("yellow")
draw_star(50)
fd(48)
begin_fill()
for i in range(5):
fd(30)
rt(72)
end_fill()
hideturtle()

done()


Comments

Popular Posts