import turtle
def yu(radius,color1,color2):
turtle.shape("turtle")
turtle.speed(0)
turtle.color("black", color1)
turtle.begin_fill()
turtle.circle(radius/2, 180)
turtle.circle(radius, 180)
turtle.lt(180)
turtle.circle(-radius/2, 180)
turtle.end_fill()
turtle.lt(90)
turtle.pu()
turtle.fd(radius * 0.35)
turtle.rt(90)
turtle.down()
turtle.color(color1,color2) # white black
turtle.begin_fill()
turtle.circle(radius * 0.15)
turtle.end_fill()
turtle.lt(90)
turtle.pu()
turtle.bk(radius * 0.35) # bk
turtle.down()
turtle.lt(90)
yu(300,"black","white")
yu(300,"white","black")
turtle.done()
Kobe - python画太极图
最新推荐文章于 2024-09-12 10:27:07 发布