Search code examples
pythongeometryshapesspiral

60 tilted circles with a hole in the center


I have made something where there are 60 circles to form one huge one, but I'd like to know how you can create a small hole in the middle. Thanks for helping!

What mine looks like rn What I want it to look like

my code

import turtle

turtle.setup(1000,1000)
turtle.hideturtle()

turtle.speed(0)
turtle.up()
turtle.goto(0,0)
turtle.down()
n = 60
for i in range(n):
    turtle.circle(200)
    turtle.left(360/n)

Solution

  • Try the following, and tinker with the values.

    import turtle
    
    turtle.setup(1000,1000)
    turtle.hideturtle()
    
    turtle.speed(0)
    turtle.up()
    turtle.goto(0,0)
    turtle.down()
    n = 20
    for i in range(n):
        turtle.up()
        turtle.backward(150)
        turtle.right(15)
        turtle.down()
    
        turtle.circle(100)
    
        turtle.up()
        turtle.left(15)
        turtle.forward(150)
        turtle.up()
    
        turtle.left(360/n)