jo.py

Created by schraf

Created on July 26, 2024

776 Bytes


from turtle import *

pensize(12)

def draw_ring(color, x, y):
    penup()
    goto(x, y)
    pendown()
    pencolor(color)
    circle(40)

colors = (0,120,208), "black", (240,40,45), (255,177,20), (0,166,81)
positions = (-96, 0), (0, 0), (96, 0), (-48, -40), (48, -40)

for i in range(5):
    draw_ring(colors[i], positions[i][0], positions[i][1])

def draw_interlace(color, x, y, start_angle, extent, s = 1):
    penup()
    goto(x, y)
    setheading(start_angle)
    pendown()
    pencolor(color)
    circle(40 * s, extent)

interlace_params = [
    ("black", 0, 0, 180, 20, -1),
    (colors[0], -55, 43, -90, 12, -1),
    ("black", 41, 43, -90, 12, -1),
    (colors[2], 96, 0, 180, 30, -1),
]

for params in interlace_params: draw_interlace(*params)
hideturtle()