python turtle animation 13
import turtle as t
import colorsys as c
t.tracer(10)
t.bgcolor('black')
t.setup(1537,865)
t.width(20)
q=0
for i in range(1200):
q+=0.01
color=c.hsv_to_rgb(q,1,1)
t.pencolor(color)
t.begin_fill()
t.fd(i)
t.rt(10)
t.fd(i)
t.circle(i,90)
t.fd(i)
t.rt(120)
t.setpos(0,0)
t.circle(i,30)
t.end_fill()
t.done()
Subscribe to subhanker codes
Comments
Post a Comment