admin 发表于 2021-1-28 16:50:17

使用Python的turtle画炫酷图形



import turtle

t = turtle.Pen()

turtle.bgcolor("black")


sides=6

colors=["red","yellow","green","blue","orange","purple"]

for x in range(360):

    t.pencolor(colors)

    t.forward(x*3/sides+x)

    t.left(360/sides+1)

    t.width(x*sides/180)

    t.left(91)
print("####结束####")


import turtle

t = turtle.Pen()

turtle.bgcolor("black")

sides=6

colors=["red","yellow","green","blue","orange","purple"]

for x in range(360):

    t.pencolor(colors)

    t.forward(x*3/sides+x)

    t.left(360/sides+1)

    t.width(x*sides/200)

print("####结束####")

﹂生﹂世﹂双人 发表于 2021-1-28 17:44:09

66666666666
页: [1]
查看完整版本: 使用Python的turtle画炫酷图形