如何用python画冰墩墩,python画冰墩墩代码教程

python画冰墩墩,拿走不谢哈

import turtle

#画布大小 800*800

turtle.setup(800,800)

# 速度0最快

turtle.speed(0)

#轮廓

# 左手

turtle.penup()

turtle.goto(176, 111)

turtle.pencolor(“lightgray”)

turtle.pensize(3)

turtle.fillcolor(“white”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(80)

turtle.circle(-45, 210)

turtle.circle(-290, 18)

turtle.end_fill()

# 头顶

turtle.penup()

turtle.goto(-73, 230)

turtle.pencolor(“lightgray”)

turtle.pensize(3)

turtle.fillcolor(“white”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(20)

turtle.circle(-250, 35)

# 左耳

turtle.setheading(50)

turtle.circle(-42, 180)

# 左侧

turtle.setheading(-50)

turtle.circle(-190, 30)

turtle.circle(-320, 45)

# 左腿

turtle.circle(120, 30)

turtle.circle(200, 12)

turtle.circle(-18, 85)

turtle.circle(-180, 23)

turtle.circle(-20, 110)

turtle.circle(15, 115)

turtle.circle(100, 12)

# 右腿

turtle.circle(15, 120)

turtle.circle(-15, 110)

turtle.circle(-150, 30)

turtle.circle(-15, 70)

turtle.circle(-150, 10)

turtle.circle(200, 35)

turtle.circle(-150, 20)

# 右手

turtle.setheading(-120)

turtle.circle(50, 30)

turtle.circle(-35, 200)

turtle.circle(-300, 23)

# 右侧

turtle.setheading(86)

turtle.circle(-300, 26)

# 右耳

turtle.setheading(122)

turtle.circle(-53, 160)

turtle.end_fill()

#内部黑色

# 右耳内

turtle.penup()

turtle.goto(-130, 180)

turtle.pencolor(“black”)

turtle.pensize(1)

turtle.fillcolor(“black”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(120)

turtle.circle(-28, 160)

turtle.setheading(210)

turtle.circle(150, 20)

turtle.end_fill()

# 左耳内

turtle.penup()

turtle.goto(90, 230)

turtle.setheading(40)

turtle.begin_fill()

turtle.pendown()

turtle.circle(-30, 170)

turtle.setheading(125)

turtle.circle(150, 23)

turtle.end_fill()

# 右手内

turtle.penup()

turtle.goto(-180, -55)

turtle.fillcolor(“black”)

turtle.begin_fill()

turtle.setheading(-120)

turtle.pendown()

turtle.circle(50, 30)

turtle.circle(-27, 200)

turtle.circle(-300, 20)

turtle.setheading(-90)

turtle.circle(300, 14)

turtle.end_fill()

# 左手内

turtle.penup()

turtle.goto(182, 95)

turtle.pencolor(“black”)

turtle.pensize(1)

turtle.fillcolor(“black”)

turtle.begin_fill()

turtle.setheading(95)

turtle.pendown()

turtle.circle(-37, 160)

turtle.circle(-20, 50)

turtle.circle(-200, 30)

turtle.end_fill()

# 右腿内

turtle.penup()

turtle.goto(-38, -210)

turtle.fillcolor(“black”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(-155)

turtle.circle(15, 100)

turtle.circle(-10, 110)

turtle.circle(-100, 30)

turtle.circle(-15, 65)

turtle.circle(-100, 10)

turtle.circle(200, 15)

turtle.setheading(-14)

turtle.circle(-200, 27)

turtle.end_fill()

# 左腿内

turtle.penup()

turtle.goto(108, -168)

turtle.fillcolor(“black”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(-115)

turtle.circle(110, 15)

turtle.circle(200, 10)

turtle.circle(-18, 80)

turtle.circle(-180, 13)

turtle.circle(-20, 90)

turtle.circle(15, 60)

turtle.setheading(42)

turtle.circle(-200, 29)

turtle.end_fill()

# 右眼

# 眼圈

turtle.penup()

turtle.goto(-64, 120)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(40)

turtle.circle(-35, 152)

turtle.circle(-100, 50)

turtle.circle(-35, 130)

turtle.circle(-100, 50)

turtle.end_fill()

# 眼珠

turtle.penup()

turtle.goto(-47, 55)

turtle.fillcolor(“white”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(0)

turtle.circle(25, 360)

turtle.end_fill()

turtle.penup()

turtle.goto(-45, 62)

turtle.pencolor(“darkslategray”)

turtle.fillcolor(“darkslategray”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(0)

turtle.circle(19, 360)

turtle.end_fill()

turtle.penup()

turtle.goto(-45, 68)

turtle.fillcolor(“black”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(0)

turtle.circle(10, 360)

turtle.end_fill()

turtle.penup()

turtle.goto(-47, 86)

turtle.pencolor(“white”)

turtle.fillcolor(“white”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(0)

turtle.circle(5, 360)

turtle.end_fill()

# 左眼

# 眼圈

turtle.penup()

turtle.goto(51, 82)

turtle.fillcolor(“black”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(120)

turtle.circle(-32, 152)

turtle.circle(-100, 55)

turtle.circle(-25, 120)

turtle.circle(-120, 45)

turtle.end_fill()

# 眼珠

turtle.penup()

turtle.goto(79, 60)

turtle.fillcolor(“white”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(0)

turtle.circle(24, 360)

turtle.end_fill()

turtle.penup()

turtle.goto(79, 64)

turtle.pencolor(“darkslategray”)

turtle.fillcolor(“darkslategray”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(0)

turtle.circle(19, 360)

turtle.end_fill()

turtle.penup()

turtle.goto(79, 70)

turtle.fillcolor(“black”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(0)

turtle.circle(10, 360)

turtle.end_fill()

turtle.penup()

turtle.goto(79, 88)

turtle.pencolor(“white”)

turtle.fillcolor(“white”)

turtle.begin_fill()

turtle.pendown()

turtle.setheading(0)

turtle.circle(5, 360)

turtle.end_fill()

# 鼻子

turtle.penup()

turtle.goto(37, 80)

turtle.fillcolor(“black”)

turtle.begin_fill()

turtle.pendown()

turtle.circle(-8, 130)

turtle.circle(-22, 100)

turtle.circle(-8, 130)

turtle.end_fill()

# 嘴

turtle.penup()

turtle.goto(-15, 48)

turtle.se

#路过的友友麻烦给小便点个赞

(0)

相关推荐