python绘制瑞克和莫蒂中人物Morty

python绘制瑞克和莫蒂中人物Morty
2021-09-12

from turtle import*

#头发
def hair():
    penup()
    right(-45)
    goto(122,-5)
    pendown()
    fillcolor("saddle brown")
    begin_fill()
    right(20)
    circle(30,20)
    circle(110,43)
    circle(120,115)
    circle(75,35)
    circle(40,55)
    left(67)
    end_fill()

#头
def head():
    penup()
    goto(123,20)
    circle(104, 0)
    pendown()
    fillcolor("peach puff")
    begin_fill()
    left(75)
    circle(104, 340)
    penup()
    goto(100,-12)
    pendown()
    right(75)
    circle(20,185)
    end_fill()
    left(15)

#左眼
def eye1():
    penup()
    goto(-52,117)
    pendown()
    fillcolor("snow")
    begin_fill()
    circle(34,360)
    end_fill()
    penup()
    goto(-60,85)
    pendown()
    fillcolor("black")
    begin_fill()
    circle(3,360)
    end_fill()

#右眼
def eye2():
    penup()
    goto(33,110)
    pendown()
    fillcolor("snow")
    begin_fill()
    circle(38, 360)
    end_fill()
    penup()
    goto(30, 75)
    pendown()
    fillcolor("black")
    begin_fill()
    circle(3, 360)
    end_fill()

#鼻子
def nose():
    penup()
    goto(-30, 50)
    pendown()
    left(30)
    circle(50,15)
    circle(10, 135)
    circle(25,30)
    fd(4)
    right(30)

#左眉毛
def eyebrow1():
    penup()
    goto(-15, 135)
    right(190)
    pendown()
    circle(50, 25)
    right(15)

#右眉毛
def eyebrow2():
    penup()
    goto(55, 120)
    right(30)
    pendown()
    circle(50, 45)
    right(15)

#嘴
def mouse():
    penup()
    goto(-20,20)
    pendown()
    left(80)
    fd(10)
    circle(50,15)
    circle(5, 135)
    circle(25,30)
    left(180)
    fd(3)
    circle(50, 15)
    circle(4, 135)
    circle(25, 30)
    fd(5)
    left(100)

#身体
def body():
    penup()
    goto(-30,-40)
    right(180)
    pendown()
    fillcolor("yellow")
    begin_fill()
    left(58)
    circle(230,32)
    left(90)
    fd(25)
    left(80)
    fd(80)
    left(10)
    penup()
    goto(-40,-163)
    right(90)
    fd(130)
    left(90)
    pendown()
    circle(250,20)
    right(20)
    penup()
    goto(90,-162)
    right(90)
    pendown()
    fd(35)
    left(90)
    circle(250,32)
    right(122)
    end_fill()


#画Morty
hair()
body()
head()
eye1()
eye2()
nose()
eyebrow1()
eyebrow2()
mouse()
penup()
goto(200,200)
pendown()
write('Morty', font=("Bradley Hand ITC", 30, "bold"))
done()

Morty

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值