escher.py

Created by schraf

Created on October 19, 2022

483 Bytes


import turtle
from math import *

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

def arcs():
  (x,y) = t.position()
  dep = t.heading()
  for angle in range(62, 120, 2):
    alpha = radians(angle)
    r = 37 / sin(alpha)
    t.setheading(angle+dep-90)
    t.penup()
    t.goto(x,y)
    t.pendown()
    t.color((255-2*angle,)*3)
    t.circle(int(r), 360 - 2 * angle)

for i in range(10):
  t.penup()
  t.goto(100,0)
  t.setheading(90)
  t.circle(100,36*i)
  t.penup()
  arcs()