python—风轮绘制

 

角度相同,goto将画笔移动到坐标为x,y的位置

import turtle
turtle.setup(800,800)
turtle.pensize(4)
for i in range(4):
    turtle.fd(150)
    turtle.right(90)    #指标向右旋转90度
    turtle.circle(-150,45)    #半径为-150 角度45度
    turtle.goto(0,0)
    turtle.left(45)    #指标向左旋转45度
turtle.done

  

 

posted @ 2020-04-17 13:40  淼如  阅读(1157)  评论(0)    收藏  举报