巨简单的海绵宝宝绘制方法,只需知道这几行语法。

t.seth()设置角度

t.fd()画笔向前

t.circle()画圆

import turtle as t t.title("海绵宝宝") #添加背景照片 t.bgpic('beijing3.png') #速度
t.speed(100) #设定初始位置 t.penup() t.seth(-30) t.fd(-200) t.pendown() #绘制海绵宝宝身体
t.pencolor('yellow')#设置画笔颜色为黄色 t.pensize(3)#设置画笔大小
t.fillcolor('yellow')#设置填充颜色为黄色 t.begin_fill()#开始填充 for i in range(4):#绘制海绵宝宝轮廓
t.circle(40,60) t.circle(-40,60) t.seth(-50) t.circle(-40,60) t.seth(-120) for
i in range(4): t.circle(40,60) t.circle(-40,60) t.seth(-180) t.pensize(10)
t.pencolor('brown') t.fd(380) t.pensize(3) t.pencolor('yellow') t.seth(120) for
i in range(4): t.circle(-40,60) t.circle(40,60) t.seth(100) t.circle(-55,50)
t.seth(30) t.circle(-35,90) t.end_fill() t.penup() t.seth(0) t.fd(-58)
t.seth(-90) t.fd(352) t.pendown() t.pensize(10) t.pencolor('brown')
t.fillcolor('brown') t.begin_fill() t.fd(70) t.seth(0) t.fd(380) t.seth(90)
t.fd(70) t.end_fill() #绘制右腿 t.penup() t.seth(180) t.fd(110) t.seth(270)
t.fd(75) t.pendown() t.begin_fill() t.fd(20) t.seth(0) t.fd(30) t.seth(90)
t.fd(20) t.end_fill() t.penup() t.seth(180) t.fd(15) t.seth(270) t.fd(28)
t.pendown() t.pencolor('yellow') t.fd(40) #绘制左腿 t.pencolor('brown') t.penup()
t.seth(90) t.fd(80) t.seth(180) t.fd(210) t.seth(270) t.fd(10) t.pendown()
t.begin_fill() t.fd(20) t.seth(0) t.fd(30) t.seth(90) t.fd(20) t.end_fill()
t.penup() t.seth(180) t.fd(15) t.seth(270) t.fd(28) t.pendown()
t.pencolor('yellow') t.fd(40) #绘制眼睛 t.penup() t.seth(90) t.fd(320) t.seth(0)
t.fd(50) t.pendown() t.fillcolor('white') t.begin_fill() t.pensize(1)
t.pencolor('black') t.circle(60) t.pensize(1) t.end_fill() t.penup() t.fd(110)
t.pendown() t.fillcolor('white') t.begin_fill() t.circle(60) t.end_fill()
t.penup() t.seth(90) t.fd(70) t.seth(180) t.fd(10) t.pendown()
t.fillcolor('blue') t.begin_fill() t.circle(15) t.end_fill() t.penup() t.fd(90)
t.pendown() t.fillcolor('blue') t.begin_fill() t.circle(15) t.end_fill()
t.penup() t.seth(155) t.fd(62) t.pendown() t.pensize(3) t.fd(20) t.penup()
t.seth(-25) t.fd(82) t.seth(130) t.fd(59) t.pendown() t.fd(20) t.penup()
t.seth(-50) t.fd(79) t.seth(105) t.fd(55) t.pendown() t.fd(20) t.penup()
t.seth(-75) t.fd(77) t.seth(0) t.fd(90) t.penup() t.seth(35) t.fd(62)
t.pendown() t.fd(20) t.penup() t.seth(205) t.fd(82) t.seth(50) t.fd(50)
t.pendown() t.fd(20) t.penup() t.seth(250) t.fd(80) t.seth(105) t.fd(60)
t.pendown() t.fd(20) #绘制鼻子 t.penup() t.seth(249) t.fd(120) t.pendown()
t.pensize(1) t.fillcolor('yellow') t.begin_fill() t.circle(-50,20)
t.circle(40,40) t.circle(10,160) t.seth(45) t.circle(50,60) t.end_fill()
#绘制海绵宝宝的嘴巴 t.penup() t.seth(250) t.fd(70) t.seth(180) t.fd(100) t.seth(-30)
t.pendown() t.pensize(3) t.circle(250,60) #绘制海绵宝宝的牙 t.pencolor('white')
t.fillcolor('white') t.penup() t.seth(180) t.fd(150) t.seth(-80) t.fd(40)
t.pendown() t.begin_fill() t.fd(20) t.seth(180) t.fd(24) t.seth(80) t.fd(26)
t.seth(0) t.penup() t.end_fill() t.fd(34) t.seth(-98) t.pendown()
t.begin_fill() t.fd(24) t.seth(0) t.fd(24) t.seth(100) t.fd(24) t.end_fill()
#绘制海绵宝宝的手 t.penup() t.seth(160) t.fd(238) t.seth(120) t.pensize(10)
t.pencolor('yellow') t.pendown() t.fd(120) t.seth(115) t.circle(180,30)
t.penup() t.seth(0) t.fd(640) t.seth(-150) t.pendown() t.circle(180,30)
t.fd(238)

 

技术
下载桌面版
GitHub
百度网盘(提取码:draw)
Gitee
云服务器优惠
阿里云优惠券
腾讯云优惠券
华为云优惠券
站点信息
问题反馈
邮箱:ixiaoyang8@qq.com
QQ群:766591547
关注微信