Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle as tt
- import math
- def ang(x):
- y = math.atan(math.sin(x)) * (180/math.pi)
- return y
- n = int(1e2)
- r = int(float(input())*n*math.pi)
- tt.penup()
- tt.back(600)
- tt.pendown()
- an = 0
- for i in range(r):
- tt.left(ang(i / n) - an)
- tt.forward(1)
- an = ang(i / n)
- tt.done()
Advertisement
Add Comment
Please, Sign In to add comment