练习_甩曲彩点动图

0


import time
import turtle

cs=['red','orange','yellow','green','cyan','gold','white','blue','purple','pink','magenta','brown','gray','lime']

turtle.ht()
turtle.speed(0)
turtle.tracer(0,0)
turtle.bgcolor('black')

def draw_pattern():
    for c in cs:
        turtle.color(c)
        turtle.circle(50,130)
        turtle.dot(10)
        turtle.circle(50,-130)
        turtle.rt(360/len(cs))

while True:
    turtle.clear()
    turtle.rt(2)
    draw_pattern()
    turtle.update()
    time.sleep(0.1)



0

发表评论