Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import turtle
- import math
- turtle.shape('turtle')
- def RerPolygon(r,n):
- b = 180*(1-2/n)
- turtle.right(180-b/2)
- a = 2*r*math.sin(math.pi/n)
- for i in range(n):
- turtle.forward(a)
- turtle.right(180-b)
- r = 10
- n = 3
- step = 0
- for i in range (10):
- turtle.penup()
- turtle.seth(90)
- turtle.forward(step)
- turtle.pendown()
- RerPolygon(r, n)
- n += 1
- step += 5
- r += step
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement