turtle畫圖代碼大全

1.彩色螺旋線

from turtle import *
import turtle
t = Turtle()
t.pensize(2)
turtle.bgcolor("black")
colors = ["red", "yellow", 'purple', 'blue']
t._tracer(False)
for x in range(400):
    for y in range(200):
        t.forward(x * y)
        t.color(colors[x % 4])
        t.left(91)
t._tracer(True)
done()

turtle畫圖代碼大全-5文章源自四五設計網-http://www.wasochina.com/35567.html 文章源自四五設計網-http://www.wasochina.com/35567.html

繼續(xù)閱讀
我的微信
微信掃一掃
weinxin
我的微信
惠生活福利社
微信掃一掃
weinxin
我的公眾號
 
  • 本文由 四五設計網小助手 發(fā)表于 2023年11月14日09:53:43
  • 轉載請務必保留本文鏈接:http://www.wasochina.com/35567.html

發(fā)表評論

匿名網友
:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

拖動滑塊以完成驗證