这里有两种解决办法——一种像你最初尝试那样的盒式解决办法,另一种是四舍五入的R. You需要使用海龟.penup(),以便你能够把海龟转移到R和龟.pendown()中心,以便再次开张。
在这两种情况下,我稍微将R右侧移至右边,甚至更右边,我也稍加tal,这样就连左腿。 可能还需要一些小的拖网。
Here is the boxy version:
import turtle
t = turtle.Turtle()
t.forward(100)
t.right(90)
t.forward(75)
t.right(90)
# Start bottom and draw leg
t.forward(40)
t.left(120)
t.forward(83)
t.left(-120)
t.forward(25)
t.right(60)
t.forward(83)
t.left(60)
t.forward(10)
t.left(90)
# end right leg, start left leg
t.forward(70)
t.left(-90)
t.forward(25)
t.right(90)
t.forward(145)
# outside done.
# Move to center cut out
t.penup()
t.right(90)
t.forward(25)
t.right(90)
t.forward(25)
t.pendown()
t.forward(25)
t.left(90)
t.forward(50)
t.left(90)
t.forward(25)
t.left(90)
t.forward(50)
t.exitonclick()
And here is the rounded version:
t = turtle.Turtle()
t.forward(63)
t.circle(-37.5, 180)
# Start bottom and draw leg
t.forward(2.5)
t.left(120)
t.forward(83)
t.left(-120)
t.forward(25)
t.right(60)
t.forward(83)
t.left(60)
t.forward(10)
t.left(90)
# end right leg, start left leg
t.forward(70)
t.left(-90)
t.forward(25)
t.right(90)
t.forward(145)
# outside done.
# Move to center cut out
t.penup()
t.right(90)
t.forward(25)
t.right(90)
t.forward(25)
t.pendown()
t.forward(25)
t.left(90)
t.forward(37.5)
t.circle(12.5, 180)
t.forward(37.5)
t.exitonclick()