Piso Ajedrezado

i_1 = Ray((0, 0), Vector[(0, 1)])
g = Ray((0, 0), Vector[(-1, 0)])
C = Point(g)
C' = Mirror(C, yAxis)
a = Ray(C', Vector[(0, 1)])
ControlTamañoBanderín = Point(a)
b = Segment(C', ControlTamañoBanderín)
A = Point(i_1)
h = Ray(A, Vector[(-1, 0)])
f = Line(A, xAxis)
Baldosas = 15 (slider from 1 to 50, step 1)
B = Point(h)
lista1 = Sequence((x(C) + ((i * abs(x(C) - x(C')))) / Baldosas, y(C)), i, 0, Baldosas)
lista2 = Sequence(Line[A, Element[lista1, i]], i, 1, Baldosas + 1)
lista3 = Sequence(Line[B, Element[lista1, i]], i, 1, Baldosas + 1)
lista4 = Sequence(Intersect[Element[lista3, i], Element[lista2, 1]], i, 1, Baldosas + 1)
lista5 = Sequence(Mirror[Element[lista4, i], yAxis], i, 1, Baldosas + 1)
lista6 = Sequence(Segment[Element[lista4, i], Element[lista5, i]], i, 1, Baldosas + 1)
lista7 = Sequence(Intersect[Element[lista2, i], Element[lista6, Baldosas + 1]], i, 1, Baldosas + 1)
lista8 = Sequence(Segment[Element[lista7, i], Element[lista1, i]], i, 1, Baldosas + 1)
i = OrthogonalLine(C', xAxis)
E = Point(b)
j = Segment(E, A)
F = Midpoint(ControlTamañoBanderín, E)
G = Midpoint(ControlTamañoBanderín, F)
H = Midpoint(ControlTamañoBanderín, G)
l = Ray(A, H)
m = Ray(A, G)
D = Point(j)
k = Ray(A, ControlTamañoBanderín)
p = Line(D, i)
J = Intersect(p, k)
K = Intersect(p, m)
q = Segment(J, D)
L = Intersect(p, l)
r = OrthogonalLine(L, i)
s = LineBisector(ControlTamañoBanderín, G)
ControlFormaBamderín = Point(s)
t = Ray(A, ControlFormaBamderín)
E_1 = Intersect(t, r)
polígono1, j_1, k_1, e = Polygon(K, E_1, J)
c = Segment(B, C')
d = Segment(A, C)
M = Intersect(d, c)
M' = Mirror(M, yAxis)
f_1 = Segment(C, M)
g_1 = Segment(M', C')
N = Intersect(p, g_1)
h_1 = Segment(D, N)
n = true