简介
用python代码画出滑稽表情,仅使用turtle库。如下:
绘画过程可以在下列平台查看:
抖音:我敢保证,你身边一定有这样的人
b站:我敢保证,你身边一定有这样的人_哔哩哔哩_bilibili
代码
# coding=gbk
from turtle import*
setup(1000,700,100,90)
shape('turtle')
turtlesize(1.5, 1.5, 1.5)
speed(10)
penup()
setheading(-90)
fd(250)
pendown()
color("yellow")
begin_fill()
setheading(0)
circle(250)
end_fill()
penup()
seth(90)
fd(370)
seth(180)
fd(200)
seth(10)
pendown()
color(1,1,1)
pensize(30)
circle(-400,20)
seth(170)
circle(400,20)
penup()
seth(0)
fd(400)
pendown()
seth(170)
circle(400,20)
penup()
seth(-90)
fd(10)
pendown()
seth(0)
color(0,0,0)
pensize(1)
begin_fill()
circle(12)
end_fill()
penup()
seth(90)
fd(10)
seth(10)
circle(-400,20)
seth(180)
fd(400)
seth(-90)
fd(10)
pendown()
seth(0)
begin_fill()
circle(12)
end_fill()
penup()
seth(90)
fd(10)
seth(0)
fd(200)
seth(-90)
fd(320)
seth(-180)
circle(-200,80)
pendown()
seth(-80)
pensize(10)
circle(200,160)
hideturtle()
done()
运行效果
备注
视频已发布到抖音和 b 站。抖音和b站名称:会代码的依古比古。
抖音视频网址:我敢保证,你身边一定有这样的人