用turtle库画四朵随机的雪花

import turtle as t
import random as r

r.seed(1)
t.pensize(2)
t.color('red')
angles = 6
points= [[0,0],[50,40],[70,80],[-40,30]]

for i in range(4):
    x0,y0 = points[i]
    t.penup()
    t.goto(x0,y0)
    t.pendown()

    length = r.randint(6, 16)
    for j in range(angles):
        t.fd(length)
        t.bk(length)
        t.right(360 / angles)
t.done()

用turtle画四朵随机的雪花

效果:

 用turtle库画四朵随机的雪花

 

上一篇:P3855 [TJOI2008]Binary Land


下一篇:halcon-invert_matrix返回逆矩阵