无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

用python畫的蠟筆小新

2019-07-25 10:40 作者:這個騷年很可耐  | 我要投稿

代碼內(nèi)容如下:

這里要導入一個turtle庫,關于此庫的函數(shù)用法在本站的北京理工大學嵩天老師python課程的第二章里有所介紹,在此不一一贅述。

import turtle as t

t.setup(650,300,200,200)

t.pu()

t.fd(250)

t.seth(90)

t.pd()

t.pensize(10)

t.pencolor('black')

#臉部輪廓

t.begin_fill()

t.color('moccasin')

t.circle(200,180)

t.seth(-180)

t.circle(100,180)

t.fd(50)

t.circle(500,40)


#畫耳朵

t.seth(-90)

t.circle(55,45)

t.seth(90)

t.seth(30)

t.fd(45)

t.seth(360)

t.circle(55,255)

t.end_fill()

#畫嘴巴

t.pu()

t.goto(-120,-100)

t.pensize(1)

t.begin_fill()

t.color('red')

t.circle(35,360)

t.end_fill()

#畫左眼

t.goto(-75,50)

t.begin_fill()

t.color('black')

t.pd()

t.circle(35,360)

t.end_fill()


#畫左眼眼白

t.goto(-65,50)

t.begin_fill()

t.color('white')

t.circle(16.5,360)

t.end_fill()


#右眼

t.pu()

t.goto(45,50)

t.begin_fill()

t.color('black')

t.pd()

t.circle(35,360)

t.end_fill()


#畫右眼眼白

t.goto(55,50)

t.begin_fill()

t.color('white')

t.circle(16.5,360)

t.end_fill()


#畫眉毛

t.pu()

t.seth(90)

t.goto(5,70)

t.pensize(1)

t.pencolor('black')

t.pd()

t.circle(45,180)


t.pu()

t.seth(90)

t.goto(5,110)

t.pensize(15)

t.pencolor('black')

t.pd()

t.circle(45,180)


t.pu()

t.seth(90)

t.goto(125,70)

t.pensize(1)

t.pencolor('black')

t.pd()

t.circle(45,180)


t.pu()

t.seth(90)

t.goto(125,110)

t.pensize(15)

t.pencolor('black')

t.pd()

t.circle(45,180)


#畫頭發(fā)

t.pu()

t.goto(255,25)

t.seth(90)

t.pd()

t.pensize(10)

t.begin_fill()

t.color('black')

t.circle(200,120)

t.seth(-15)

t.fd(280)

t.seth(-90)

t.fd(100)

t.seth(360)

t.fd(25)

t.end_fill()

個人感覺還是有所欠缺,因此還希望大佬多多指正!

用python畫的蠟筆小新的評論 (共 條)

分享到微博請遵守國家法律
潢川县| 卢湾区| 华容县| 舟山市| 衡阳县| 黔江区| 大宁县| 东阿县| 洛宁县| 泸溪县| 罗田县| 大冶市| 阳朔县| 丹江口市| 方城县| 綦江县| 广汉市| 仪陇县| 象州县| 潢川县| 周至县| 偃师市| 鄂尔多斯市| 阿坝| 静乐县| 甘谷县| 宁远县| 沂源县| 满洲里市| 石家庄市| 娄底市| 怀远县| 桐城市| 道真| 陇南市| 佛坪县| 健康| 桑植县| 宿州市| 连城县| 夏河县|