|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
用python turtle库画的卡皮巴拉
- import turtle as t
- t.speed(0)
- #边框
- t.penup()
- t.goto(-200,-200)
- t.pendown()
- t.pensize(10)
- t.fillcolor('lightgrey')
- t.begin_fill()
- for i in range(4):
- t.forward(400)
- t.left(90)
- t.end_fill()
- #被子白色边
- t.fillcolor('white')
- t.begin_fill()
- t.setheading(45)
- t.circle(-500,50)
- t.setheading(-90)
- t.pensize(1)
- t.setheading(-90)
- t.forward(30)
- t.pensize(10)
- t.setheading(-183)
- t.circle(500,42)
- t.pensize(1)
- t.setheading(180)
- t.forward(45)
- t.end_fill()
- #蓝色被子
- t.forward(-45)
- t.fillcolor('royalblue')
- t.begin_fill()
- t.goto(200,-200)
- t.setheading(90)
- t.forward(117)
- t.setheading(-183)
- t.circle(500,42)
- t.end_fill()
- t.penup()
- t.goto(-200,-200)
- t.pendown()
- t.pensize(10)
- t.goto(200,-200)
- t.setheading(90)
- t.forward(117)
- t.setheading(-183)
- t.circle(500,42)
- #枕头
- t.penup()
- t.goto(-130,-100)
- t.pendown()
- t.fillcolor('lightgoldenrod2')
- t.begin_fill()
- t.setheading(-55)
- t.circle(500,-15)
- t.right(75)
- t.circle(700,-25)
- t.right(65)
- t.circle(500,-15)
- t.right(75)
- t.circle(700,-25)
- t.end_fill()
- #卡皮巴拉
- t.penup()
- t.goto(-70,-100)
- t.pendown()
- t.fillcolor('tan')
- t.begin_fill()
- t.setheading(90)
- t.circle(-300,10)
- t.setheading(110)
- t.circle(-200,10)
- t.setheading(180)
- t.circle(-40,50)
- t.setheading(60)
- t.circle(-40,60)
- t.left(40)
- t.circle(-400,15)
- t.setheading(-5)
- t.circle(-50,10)
- t.right(5)
- t.circle(-50,10)
- t.right(5)
- t.circle(-50,10)
- t.right(5)
- t.circle(-50,10)
- t.forward(15)
- t.right(5)
- t.circle(-50,10)
- t.right(5)
- t.circle(-50,10)
- t.right(5)
- t.circle(-50,10)
- t.forward(35)
- t.right(5)
- t.circle(-50,10)
- t.right(5)
- t.circle(-50,10)
- t.forward(10)
- t.left(90)
- t.forward(35)
- t.end_fill()
- t.penup()
- t.goto(-200,-200)
- t.pendown()
- t.setheading(45)
- t.circle(-500,50)
- #耳朵
- t.penup()
- t.goto(-80,3)
- t.pendown()
- t.pensize(10)
- t.setheading(-10)
- t.forward(5)
- #眼睛
- t.penup()
- t.setheading(30)
- t.forward(30)
- t.pendown()
- t.right(50)
- t.circle(10,100)
- #嘴
- t.penup()
- t.goto(20,50)
- t.pendown()
- t.right(50)
- t.forward(20)
- t.right(180)
- t.forward(10)
- t.setheading(-70)
- t.forward(25)
- t.left(45)
- t.forward(15)
- t.right(180)
- t.forward(15)
- t.left(90)
- t.forward(15)
- #手
- t.penup()
- t.goto(-20,-93)
- t.pendown()
- t.pensize(5)
- t.fillcolor('tan')
- t.begin_fill()
- t.setheading(45)
- t.circle(10)
- t.end_fill()
- t.penup()
- t.setheading(20)
- t.forward(20)
- t.pendown()
- t.begin_fill()
- t.circle(10)
- t.end_fill()
- #小气泡
- t.penup()
- t.goto(-70,40)
- t.pendown()
- t.pensize(8)
- t.fillcolor('white')
- t.begin_fill()
- t.circle(13)
- t.end_fill()
- #大气泡
- t.penup()
- t.setheading(135)
- t.forward(60)
- t.setheading(40)
- t.forward(20)
- t.pendown()
- t.pensize(10)
- t.setheading(45)
- t.begin_fill()
- t.circle(50)
- t.end_fill()
- #橘子
- t.penup()
- t.goto(-133,100)
- t.pendown()
- t.pensize(8)
- t.fillcolor('orange')
- t.begin_fill()
- t.setheading(0)
- t.circle(25)
- t.end_fill()
- t.penup()
- t.setheading(90)
- t.forward(50)
- t.pendown()
- t.pencolor('springgreen3')
- t.circle(-15,100)
- t.done()
复制代码 |
-
评分
-
参与人数 2 | 荣誉 +7 |
鱼币 +8 |
贡献 +8 |
C币 +3 |
收起
理由
|
不二如是
| + 2 |
+ 3 |
+ 3 |
+ 3 |
鱼C有你更精彩^_^ |
青出于蓝
| + 5 |
+ 5 |
+ 5 |
|
可爱 |
查看全部评分
|