I'm trying to make a function which draws an irregular arc similar to figure 1, instead it has drawn a spiral. I'm not sure how to draw one correctly and there are no functions to do this to my knowledge
import turtle
char = turtle.Turtle()
char.speed(0)
screen = turtle.Screen()
screen.tracer(False)
def draw_arc(length, left_right):
sx = char.xcor()
sy = char.ycor()
def turn(angle):
if left_right:
char.left(angle)
else:
char.right(angle)
count = 1.8
turn(90)
char.forward(1)
while char.xcor() != sx and char.ycor() != sy and count >= 0:
char.forward(1)
turn(1 * count)
count -= 0.01
draw_arc(100, True)
screen.update()
turtle.listen()
turtle.mainloop()