画出自己喜欢的长草颜团子

 

代码奉上:

import turtle
import math
t = turtle

'''''坐标
t.up()
t.speed(20)
t.goto(-300, 0)
t.down()
t.goto(300, 0)
t.up()
t.goto(0, -300)
t.down()
t.goto(0, 300)
'''''
# 脸
t.up()
t.goto(-100, -100*math.sqrt(3))
t.down()
t.color("black")
t.pensize(3)
t.speed(2)
t.right(30)
t.circle(200, -300)

# 身体
t.up()
t.goto(-100*math.sqrt(2), -100*math.sqrt(2))
t.down()
t.right(135)
t.circle(300, 100)
t.up()
t.goto(100*math.sqrt(2), -100*math.sqrt(2))
t.down()
t.left(115)
t.circle(300, -100)

# 肚皮
t.pensize(5)
t.color("pink")
t.begin_fill()
t.fillcolor("orange")
t.up()
t.goto(17.5, -275)
t.down()
t.circle(100, 360)
t.forward(1)
t.end_fill()

# 爱心
t.begin_fill()
t.fillcolor("red")
t.up()
t.color("red")
t.goto(0, -150)
t.down()
t.left(115)
t.circle(30, 180)
t.goto(0, -250)
t.up()
t.goto(0, -150)
t.down()
t.right(70)
t.circle(30, -180)
t.goto(0, -250)
t.goto(0, -150)
t.end_fill()
t.up()
t.goto(40, -160)
t.color("white")
t.begin_fill()
t.fillcolor("white")
t.down()
t.circle(8)
t.end_fill()

# 眼睛
t.up()
t.goto(-50, 50)
t.color("brown")
t.pensize(1)
t.begin_fill()
t.fillcolor("brown")
t.down()
t.circle(15)
t.up()
t.goto(70, 50)
t.down()
t.circle(15)
t.end_fill()

# 嘴巴
t.up()
t.goto(0, 25)
t.pensize(5)
t.down()
t.left(40)
t.left(10)
t.circle(20, -220)
t.up()
t.goto(0, 25)
t.down()
t.left(10)
t.circle(20, 220)

# 手
t.up()
t.goto(-100, -210)
t.pensize(3)
t.color("black")
t.begin_fill()
t.fillcolor("white")
t.down()
t.goto(-40, -180)
t.right(90)
t.circle(-math.sqrt(1125)/2, 180)
t.goto(-80, -250)
t.end_fill()
t.up()
t.goto(100, -210)
t.begin_fill()
t.fillcolor("white")
t.down()
t.goto(40, -180)
t.right(60)
t.circle(math.sqrt(1125)/2, 180)
t.goto(80, -250)
t.end_fill()

# 腿
t.up()
t.goto(20, -285)
t.down()
t.circle(-100, 60)
t.up()
t.goto(-20, -285)
t.down()
t.right(40)
t.circle(100, 60)
t.up()
t.goto(-20, -285)
t.down()
t.left(105)
t.circle(-40, 60)

# 草
t.up()
t.goto(0, 200)
t.begin_fill()
t.fillcolor("green")
t.down()
t.left(120)
t.circle(300, 15)
t.right(105)
t.up()
t.goto(-5, 239)
t.down()
t.right(160)
t.circle(-150, 47.5)
t.up()
t.goto(-10, 278)
t.down()
t.circle(90, 85)
t.up()
t.goto(-5, 239)
t.down()
t.left(115)
t.circle(150, 47.5)
t.up()
t.goto(-10, 278)
t.down()
t.circle(-90, 85)
t.up()
t.goto(-10, 278)
t.goto(-127, 247.5)
t.goto(-5, 239)
t.down()
t.end_fill()

# 腮红
t.up()
t.goto(-80, 50)
t.color("pink")
t.begin_fill()
t.fillcolor("pink")
t.pensize(1)
t.down()
t.left(45)
t.circle(-10, 180)
t.forward(20)
t.circle(-10, 180)
t.forward(20)
t.up()
t.goto(75, 50)
t.down()
t.left(180)
t.circle(10, 180)
t.forward(20)
t.circle(10, 180)
t.forward(20)
t.end_fill()
t.up()
t.pensize(5)
t.color("white")
t.goto(-85, 45)
t.down()
t.left(60)
t.forward(10)
t.up()
t.goto(-95, 45)
t.down()
t.forward(10)
t.up()
t.goto(80, 45)
t.down()
t.left(60)
t.forward(10)
t.up()
t.goto(90, 45)
t.down()
t.forward(10)

t.hideturtle()
t.done()

Python初学者一枚,希望各位大佬给点建议叭

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

心雨\星愿^

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值