Python Turtle Graphic Design #5
Source code:
import turtle as t
import colorsys as cs
t.setup(640,640)
t.bgcolor('black')
t.tracer(100)
t.hideturtle()
for i in range(600,0,-1):
t.color(cs.hls_to_rgb((600-i)/1200,0.5-(600-i)/2400,i/600))
t.fd(i/2)
t.lt(120)
t.begin_fill()
for j in range(6):
t.fd(i/2)
t.lt(60)
t.end_fill()
t.lt(60)
t.fd(i/2)
t.rt(179)
t.done()
No comments:
Post a Comment