python turtle animation(10)


import turtle as t
import colorsys as c
t.tracer(20)
t.setup(1537,865)
t.bgcolor('black')
t.ht()
p=0
t.width(4)
for i in range(1200):
    color=c.hsv_to_rgb(p,1,1)
    p+=0.01
    t.fillcolor(color)
    t.fd(i)
    t.begin_fill()
    t.rt(200)
    t.fd(i)
    t.rt(120)
    t.fd(i)
    t.rt(60)
    t.fd(i)
    t.rt(120)
    t.end_fill()
t.done()

output: 



Subscribe to subhanker codes

Comments

Popular posts from this blog

python turtle animation 15

python turtle animation 11

python turtle animation 16