有没有人能用python画一下这个波吉呀(求大家看看,python,turtle库,啦啦)
用python画波吉代码如下
#波吉测试版
from turtle import *
setup(600,600)
screensize(bg="#1273e0")
reset()
pensize(2)
speed(9)
pencolor("black")
left(90) # 右耳
pu()
goto(114,-18)
pd()
color("#000000","#fde0c3")
begin_fill()
circle(40)
end_fill()
pu() # 左耳
goto(-34,-18)
pd()
color("#000000","#fde0c3")
begin_fill()
circle(40)
end_fill()
right(90)
pu() # 脸
goto(0,-100)
pd()
color("#000000","#fde0c3")
begin_fill()
circle(100)
end_fill()
left(90) # 右眼白
pu()
goto(75,10)
pd()
color("white")
begin_fill()
circle(20)
end_fill()
color("black") # 右眼线
pensize(5)
circle(20,190)
color("white")
circle(20,60)
pensize(3)
color("black")
circle(20,60)
pensize(5)
color("white")
circle(20,50)
pu() # 右黑眼
right(180)
goto(48,11)
pd()
color("black")
begin_fill()
circle(8)
end_fill()
pu() # 左眼白
goto(-68,10)
pd()
color("white")
begin_fill()
circle(20)
end_fill()
pu()
goto(-28,10)
left(180)
pd()
color("black") # 左眼线
pensize(5)
circle(20,190)
color("white")
circle(20,60)
pensize(3)
color("black")
circle(20,60)
pensize(5)
color("white")
circle(20,50)
pu() # 左黑眼
right(180)
goto(-56,11)
pd()
color("black")
begin_fill()
circle(8)
end_fill()
right(180)
right(200) # 鼻子
pu()
goto(-8,-23)
pd()
pensize(2)
circle(10,60)
left(73) # 右嘴角
pu()
goto(0,-62)
pd()
pensize(2)
fd(60)
left(143) # 左嘴角
pu()
goto(0,-62)
pd()
pensize(2)
fd(60)
left(64)
pu() # 左红脸蛋1
goto(-78,-18)
pd()
color("#ff807d")
pensize(4)
fd(6)
pu() # 左红脸蛋2
goto(-68,-16)
pd()
color("#ff807d")
fd(13)
pu() # 左红脸蛋3
goto(-54,-14)
pd()
color("#ff807d")
fd(19)
pu() # 左红脸蛋4
goto(-42,-13)
pd()
color("#ff807d")
fd(20)
pu() # 左红脸蛋5
goto(-31,-14)
pd()
color("#ff807d")
fd(15)
pu() # 右红脸蛋1
goto(80,-18)
pd()
color("#ff807d")
fd(6)
pu() # 右红脸蛋2
goto(72,-16)
pd()
color("#ff807d")
fd(13)
pu() # 右红脸蛋3
goto(61,-14)
pd()
color("#ff807d")
fd(19)
pu() # 右红脸蛋4
goto(49,-13)
pd()
color("#ff807d")
fd(20)
pu() # 右红脸蛋5
goto(36,-14)
pd()
color("#ff807d")
fd(15)
pu() # 皇冠
right(166)
goto(25,90)
pd()
color("#fffaad","#ffd659")
pensize(2)
begin_fill()
fd(65)
pu()
right(130)
pd()
pensize(7)
fd(28)
pu()
left(100)
pd()
pensize(3)
fd(21)
pu()
right(120)
pd()
pensize(6)
fd(21)
pu()
left(88)
pd()
pensize(4)
fd(28)
pu()
right(130)
pd()
pensize(4)
fd(65)
pu()
right(86)
pd()
pensize(3)
fd(60)
end_fill()
pu() # 左眉毛
color("black")
left(15)
goto(-40,50)
pd()
pensize(2)
circle(25,78)
pu() # 右眉毛
right(102)
goto(69,45)
pd()
circle(25,78)
pu() # 头发
right(155)
goto(100,0)
pd()
color("grey","black")
pensize(6)
begin_fill()
circle(50,40)
circle(35,65)
right(100)
pensize(9)
circle(30,140)
right(60)
circle(75,85)
right(62)
pensize(5)
circle(40,130)
right(98)
pensize(3)
circle(25,150)
pu()
left(78)
pd()
color("black")
pensize(2)
circle(75,30)
pu()
right(65)
pd()
circle(75,48)
pu()
right(130)
pd()
circle(35,110)
pu()
right(150)
pd()
circle(75,28)
circle(45,32)
left(9)
pu()
right(110)
goto(30,70)
pd()
circle(45,60)
left(8)
pu()
left(25)
goto(30,70)
pd()
circle(70,30)
pu()
right(60)
pd()
circle(80,40)
pd()
right(70)
pd()
circle(90,15)
pu()
pencolor("grey")
pensize(4)
left(110)
pd()
circle(25,90)
end_fill()
pu() # 拉链
left(160)
pensize(2)
pencolor("black")
goto(0,-100)
pd()
fd(20)
right(20)
circle(500,25)
pu() # 左手
goto(-118,-252)
pd()
color("#fff4e9","#fde0c3")
begin_fill()
circle(28)
end_fill()
pu() # 左胳膊
goto(-42,-90)
right(60)
pd()
color("#000000","#30629f")
begin_fill()
pensize(6)
pencolor("#5a9cec")
circle(300,20)
pencolor("#30629f")
circle(300,4)
pencolor("#5a9cec")
circle(300,6)
circle(20,95)
color("#000000","#30629f")
pensize(2)
circle(100,14)
pu() # 身体
goto(-65,-180)
left(3)
right(118)
pd()
pensize(6)
pencolor("#5a9cec")
circle(400,16)
pu()
left(80)
pd()
pensize(2)
pencolor("#000000")
circle(300,35)
pu()
left(76)
pd()
circle(500,15)
pu() # 右胳膊
goto(58,-160)
right(60)
pd()
circle(500,18)
pu()
left(40)
pd()
circle(25,80)
circle(50,13)
left(25)
circle(400,15)
right(86)
circle(38,70)
right(93)
circle(38,70)
end_fill()
pu() # 拉链
right(85)
left(160)
pensize(2)
pencolor("black")
goto(0,-100)
pd()
fd(20)
right(20)
circle(500,25)
pu() # 右手
goto(104,-10)
left(140)
pensize(2)
pd()
color("#000000","#fde0c3")
begin_fill()
circle(10,45)
left(8)
circle(25,25)
pu()
goto(115,-5)
pd()
right(18)
circle(35,26)
left(17)
circle(10,40)
pu()
goto(114,-5)
right(120)
pd()
circle(50,30)
pu()
goto(117,22)
left(70)
pd()
circle(8,35)
circle(4,50)
pu()
goto(121,-3)
left(180)
pd()
circle(50,30)
pu()
goto(121,-3)
right(60)
pd()
circle(60,28)
pu()
goto(134,24)
left(70)
pd()
circle(8,35)
pu()
goto(128,-5)
left(229)
pd()
circle(60,32)
pu()
goto(128,-5)
right(58)
pd()
circle(55,29)
pu()
goto(150,16)
left(78)
pd()
circle(8,35)
pu()
goto(136,-7)
right(136)
pd()
circle(55,31)
pu()
goto(136,-7)
right(58)
pd()
circle(55,24)
pu()
goto(160,-1)
left(70)
pd()
circle(8,35)
pu()
goto(143,-10)
right(131)
pd()
circle(55,22)
pu()
goto(140,-23)
left(16)
pd()
circle(65,15)
pu()
goto(140,-23)
left(60)
pd()
circle(38,68)
end_fill()
done()
想法不错,一周之内看看能不能实现
直接加载位图
或使用比如CorelDraw将位图转为矢量图,并导出为ai文件,再将ai文件中的矢量数据转换为python数组格式放到python代码中
把图片生成为base64字符串,再用python加载这个字符串。