turtle畫簡筆畫 便便

2021-10-02 08:37:10 字數 2307 閱讀 2254

最近開始學習turtle繪圖記錄一下,自己找了個,練練手。

流行漸變色:

程式如下:

import turtle as t

t.pensize(5)

# 畫筆粗細

t.speed(11)

# 畫筆速度

t.colormode(

255)

# r,g,b畫畫模式

color =

255step =

15for i in

range

(300,10

,-10)

:if(color >= step)

: color = color - step

else

: color =

0 t.color(

(255

, color,

255)

)# 畫筆顏色

t.penup(

)# 抬起畫筆

t.goto(0,

-i)# 移動畫筆到定點

t.pendown(

)# 落下畫筆

t.circle(i)

# 畫圓

t.mainloop(

)# 事件迴圈

簡筆畫–便便

程式如下:

'''

created on jan 23, 2020

@author: kun

'''import turtle as t

defskip

(step)

: t.penup(

) t.forward(step)

t.pendown(

)def

skip_point

(x, y)

: t.penup(

) t.goto(x, y)

t.pendown(

)t.colormode(

255)

# r,g,b畫畫模式

t.speed(3)

t.right(90)

skip(

-200

)t.right(-30

)t.color(

(255

,215,0

))# 畫筆顏色

t.pensize(8)

# 第乙個

t.fillcolor(

"yellow"

)t.begin_fill(

)t.circle(-40

,130

)t.right(-10

)t.circle(50,

180)

t.forward(35)

skip(30)

t.forward(35)

t.circle(50,

180)

t.circle(-60

,90)t.end_fill(

)#########################

t.right(-90

)skip(90)

t.left(90)

skip(

130)

t.right(80)

# 第二個

# t.fillcolor("pink")

# t.begin_fill()

t.circle(55,

170)

t.forward(80)

skip(20)

t.forward(90)

t.circle(55,

180)

#########################

skip(

240)

t.left(90)

skip(80)

t.right(80)

# 第三個

t.circle(65,

180)

t.right(10)

t.forward(

270)

t.circle(65,

180)

t.end_fill(

)#########################

t.mainloop(

)純屬娛樂

簡筆畫 大象

簡筆畫 大象 caption id attachment 2991 align aligncenter width 302 caption id attachment 2992 align aligncenter width 302 caption id attachment 2993 align ...

簡筆畫 鴨子

簡筆畫,鴨子。caption id attachment 3452 align aligncenter width 302 caption id attachment 3453 align aligncenter width 302 caption id attachment 3454 align ...

python畫光頭強 光頭強簡筆畫怎麼畫

苗 苗簡筆畫為 你 提 供光頭強簡筆畫怎麼畫 光頭強簡筆畫怎麼畫,下面帶你來學習光頭強簡筆畫簡單又漂亮的畫法。首先介紹一下 光頭強是動畫片熊出沒裡的角色,他在砍樹時總是受到熊大和熊二的阻撓,下面我們就來看看簡筆畫光頭強是怎麼畫的吧。光頭強是動畫片 熊出沒 系列中的反派 熊岀沒之探險日記中為正派人物 ...