python turtle animation (8)


import turtle as t
import colorsys as c
t.width(30)
t.tracer(50)
t.bgcolor('black')
t.setup(1537,865)
r=0.0
for i in range(2000):
    r+=0.01
    color=c.hsv_to_rgb(r,1,1)
    t.pencolor('black')
    t.fillcolor(color)
    t.fd(i)
    t.rt(200)
    t.fd(i)
    t.lt(300)
    t.begin_fill()
    t.fd(i)
    t.rt(60)
    t.fd(i)
    t.circle(i,90)
    t.fd(i)
    t.rt(270)
    t.end_fill()
t.done()
output :


Subscribe to subhanker codes

Comments

Popular posts from this blog

python turtle animation 16

python turtle animation 11

free fire logo || python turtle graphics code