import turtle t = turtle t.speed(0) t.hideturtle() t.pensize(1) d = 4 def forme(x,y,a): f=120,1,-60,5,60,1,60,1,120,1,-60,4,-120,2,180,2,-120,2,60,1,120,3 t.penup() t.goto(x, y) t.pendown() t.left(a) for i in range(0, len(f), 2): t.left(f[i]) t.fd(d * f[i + 1]) def trio(x, y, a): for i in range(3): t.setheading(a) forme(x, y, 120 * i) for l in range(13): for c in range(16): if c % 3 != 2: trio(-180 + 6 * d * c + 9 * d * (l % 2), -120 + 5.2 * d * l, 60 * (c % 3))