lab_turtle/drawing.py

22 lines
544 B
Python

import turtle
def draw_loop(radius, angle):
""" Draw a single loop part of the interlocking design. """
for _ in range(2):
pen.circle(radius, angle)
pen.circle(radius // 2, angle * 5)
pen.circle(radius, angle)
# Screen setup
turtle.bgcolor("lightblue")
pen = turtle.Turtle()
pen.speed(0)
pen.color("white")
# Drawing multiple loops
for _ in range(30):
draw_loop(50, 50) # Adjust the radius and angle as needed
pen.right(50) # Adjust the turning angle for interlocking
pen.hideturtle()
turtle.done()