tiles1.py

Created by schraf

Created on April 02, 2024

488 Bytes


import turtle

t = turtle
t.speed(0)
t.hideturtle()

size = 40

def arcs(x, y, i):
 for a in i, -i:
  t.penup()
  t.goto(x, y)
  t.down()
  r, d = size, 5
  if a < 0: r, d = -r, -d
  t.setheading(45 * a + d)
  t.circle(r, 93)

def motif(c, l):
 x, y = 2 * size * c + size * (l % 2) - 160, size * l - 110
 for i in range(8): arcs(x, y, i)

for l in range(7):
 for c in range(6):
  for u, v in ('black', 5), ('white', 1): 
      t.color(u)
      t.pensize(v)
      motif(c, l)