用python画一只写轮眼

两年前刚学python的时候的一个小作业,其实代码很简单就是用turtle库里面几个很基础的函数写的,本来觉得写得很稀碎,没什么借鉴意义,但一直有人问我要代码,那就发一下吧,感兴趣的话可以跑一下玩玩。

 

import turtle as t
t.pensize(2)
t.penup()
t.goto(0,-50)
t.pendown()
t.color("black")
t.begin_fill()
t.circle(50)
t.color("red")
t.end_fill()
t.penup()
t.goto(0,-10)
t.pendown()
t.color("black")
t.circle(10)
t.penup()
t.goto(0,10)
t.pendown()
t.seth(90)
t.begin_fill()
t.fd(40)
t.seth(175)
t.circle(40,-120)
t.seth(65)
t.circle(35,100)
t.seth(260)
t.fd(25)
t.end_fill()
t.penup()
t.goto(10,0)
t.pendown()
t.seth(90)
t.circle(10,-30)
t.seth(330)
t.begin_fill()
t.fd(40)
t.seth(53)
t.circle(40,-120)
t.seth(302)
t.circle(35,100)
t.seth(140)
t.fd(25)
t.end_fill()
t.penup()
t.goto(-10,0)
t.pendown()
t.seth(270)
t.circle(10,30)
t.begin_fill()
t.seth(210)
t.fd(40)
t.seth(294)
t.circle(40,-120)
t.seth(183)
t.circle(35,100)
t.seth(19)
t.fd(25)
t.end_fill()
t.penup()
t.goto(-120,100)
t.pendown()
t.color("black")
t.begin_fill()
t.seth(320)
t.fd(15)
t.seth(9)
t.fd(160)
t.seth(6)
t.fd(100)
t.penup()
t.goto(-120,100)
t.pendown()
t.seth(9)
t.fd(160)
t.seth(1)
t.fd(110)
t.color("gainsboro")
t.end_fill()
t.color("oldlace")
t.penup()
t.goto(0,200)
t.pendown()
t.begin_fill()
t.seth(266)
t.fd(20)
t.seth(267)
t.fd(20)
t.seth(268)
t.fd(20)
t.seth(269)
t.fd(80)
t.seth(270)
t.fd(8)
t.penup()
t.goto(0,200)
t.pendown()
t.seth(273)
t.fd(70)
t.seth(272)
t.fd(30)
t.seth(271)
t.fd(20)
t.seth(270)
t.fd(28)
t.seth(180)
t.fd(10)
t.color("floralwhite")
t.end_fill()
t.penup()
t.goto(-105,-45)
t.pendown()
t.color("black")
t.pensize(3)
t.seth(45)
t.fd(9)
t.seth(48)
t.fd(6)
t.seth(66)
t.fd(15)
t.seth(62)
t.fd(30)
t.seth(56)
t.fd(25)
t.seth(35)
t.fd(20)
t.seth(20)
t.fd(20)
t.seth(15)
t.fd(20)
t.seth(10)
t.fd(20)
t.seth(5)
t.fd(30)
t.seth(0)
t.fd(35)
t.seth(5)
t.fd(40)
t.penup()
t.goto(-98,-47)
t.pendown()
t.seth(358)
t.fd(6)
t.seth(340)
t.fd(10)
t.seth(357)
t.fd(10)
t.seth(358)
t.fd(25)
t.seth(359)
t.fd(20)
t.seth(0)
t.fd(20)
t.seth(3)
t.fd(10)
t.seth(4)
t.fd(5)
t.seth(9)
t.fd(5)
t.seth(16)
t.fd(5)
t.seth(22)
t.fd(5)
t.seth(30)
t.fd(10)
t.seth(45)
t.fd(20)
t.seth(55)
t.fd(60)
t.seth(60)
t.fd(28)
t.seth(55)
t.fd(9)
t.penup()
t.goto(-105,-43)
t.seth(45)
t.fd(9)
t.seth(48)
t.fd(6)
t.pendown()
t.seth(66)
t.fd(15)
t.seth(62)
t.fd(30)
t.seth(56)
t.fd(25)
t.seth(35)
t.fd(20)
t.seth(20)
t.fd(20)
t.seth(15)
t.fd(20)
t.seth(10)
t.fd(20)
t.seth(5)
t.fd(30)
t.seth(0)
t.fd(35)
t.seth(5)
t.fd(35)
t.penup()
t.goto(-105,-41)
t.seth(45)
t.fd(9)
t.seth(48)
t.fd(6)
t.pendown()
t.seth(66)
t.fd(15)
t.seth(62)
t.fd(30)
t.seth(56)
t.fd(25)
t.seth(35)
t.fd(20)
t.seth(20)
t.fd(20)
t.seth(15)
t.fd(20)
t.seth(10)
t.fd(20)
t.seth(5)
t.fd(30)
t.seth(0)
t.fd(35)
t.seth(5)
t.fd(29)
t.penup()
t.goto(-105,-39)
t.seth(45)
t.fd(9)
t.seth(48)
t.fd(6)
t.pendown()
t.seth(66)
t.fd(15)
t.seth(62)
t.fd(30)
t.seth(56)
t.fd(25)
t.seth(35)
t.fd(20)
t.seth(20)
t.fd(20)
t.seth(15)
t.fd(20)
t.seth(10)
t.fd(20)
t.seth(5)
t.fd(30)
t.seth(0)
t.fd(35)
t.seth(5)
t.fd(24)
t.penup()
t.goto(-98,-49)
t.seth(358)
t.fd(6)
t.pendown()
t.seth(340)
t.fd(10)
t.seth(357)
t.fd(10)
t.seth(358)
t.fd(25)
t.seth(359)
t.fd(20)
t.seth(0)
t.fd(20)
t.seth(3)
t.fd(10)
t.seth(4)
t.fd(5)
t.seth(9)
t.fd(5)
t.seth(16)
t.fd(5)
t.seth(22)
t.fd(5)
t.seth(30)
t.fd(10)
t.seth(45)
t.fd(20)
t.seth(55)
t.fd(60)
t.seth(60)
t.fd(28)
t.seth(55)
t.fd(9)
t.penup()
t.color("oldlace")
t.goto(0,-162)
t.pendown()
t.pensize(2)
t.begin_fill()
t.seth(94)
t.fd(20)
t.seth(93)
t.fd(20)
t.seth(92)
t.fd(50)
t.seth(91)
t.fd(15)
t.penup()
t.goto(0,-162)
t.pendown()
t.seth(86)
t.fd(50)
t.seth(87)
t.fd(20)
t.seth(88)
t.fd(10)
t.seth(89)
t.fd(25)
t.seth(180)
t.fd(8)
t.color("floralwhite")
t.end_fill()
t.penup()
t.goto(5,-48)
t.pendown()
t.color("black")
t.begin_fill()
t.seth(4)
t.fd(3)
t.seth(9)
t.fd(5)
t.seth(16)
t.fd(5)
t.seth(22)
t.fd(5)
t.seth(30)
t.fd(10)
t.seth(45)
t.fd(20)
t.seth(55)
t.fd(20)
t.seth(60)
t.fd(3)
t.seth(20)
t.fd(2)
t.seth(0)
t.fd(2)
t.seth(350)
t.fd(3)
t.seth(300)
t.fd(3)
t.seth(235)
t.fd(30)
t.seth(245)
t.fd(15)
t.seth(255)
t.fd(10)
t.seth(260)
t.fd(15)
t.seth(265)
t.fd(40)
t.seth(268)
t.fd(40)
t.seth(270)
t.fd(45)
t.seth(280)
t.fd(7)
t.seth(285)
t.fd(7)
t.seth(290)
t.fd(5)
t.seth(285)
t.fd(5)
t.seth(275)
t.fd(5)
t.seth(270)
t.fd(3)
t.seth(260)
t.fd(7)
t.seth(220)
t.fd(5)
t.seth(180)
t.fd(5)
t.seth(120)
t.fd(5)
t.seth(105)
t.fd(5)
t.seth(95)
t.fd(5)
t.seth(90)
t.fd(3)
t.seth(85)
t.fd(3)
t.seth(80)
t.fd(5)
t.seth(85)
t.fd(5)
t.seth(90)
t.fd(65)
t.seth(92)
t.fd(35)
t.seth(95)
t.fd(30)
t.seth(110)
t.fd(15)
t.seth(140)
t.fd(10)
t.seth(180)
t.fd(8)
t.seth(140)
t.fd(3)
t.seth(110)
t.fd(3)
t.seth(90)
t.fd(2)
t.seth(60)
t.fd(2)
t.seth(10)
t.fd(5)
t.color("red")
t.end_fill()
t.penup()
t.goto(180,-180)
t.pensize(2)
t.color("black")
t.pendown()
t.seth(0)
t.circle(10,-60)
t.circle(12,-60)
t.circle(14,-60)
t.circle(16,-60)
t.circle(18,-60)
t.circle(20,-60)
t.circle(22,-60)
t.circle(24,-60)
t.circle(26,-90)
t.seth(45)
t.fd(15)
t.penup()
t.goto(160,-175)
t.pendown()
t.seth(240)
t.fd(20)
t.seth(0)
t.fd(20)
t.penup()
t.goto(300,300)

  • 2
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值