Ver esquema

Remarcar baldosas cruzadas

nn = 10 (slider from 1 to 30, step 1)
mm = 12 (slider from 1 to 36, step 1)
m: round(mm)
n: round(nn)
ancho: x(Corner[3] - Corner[4])
alto: y(Corner[4] - Corner[1])
A: Corner[4] + (ancho, (-alto)) / 10 + (0.5, 0)
inc = Min((0.8 * ancho / m), (0.8 * alto / n))
paseo = Segment(A - ((0, n) * inc), A + ((m, 0) * inc))
lista2 = Sequence(Segment[A + ((s, 0) * inc), A + ((s, (-n)) * inc)], s, 0, m)
lista3 = Sequence(Segment[A + ((0, (-s)) * inc), A + ((m, (-s)) * inc)], s, 0, n)
lista4: {Polygon[A, A + ((m, 0) * inc), A + ((m, (-n)) * inc), A + ((0, (-n)) * inc)]}
a = true
D: A + ((m, 0) * inc)
E: A + ((0, (-n)) * inc)
b = Line(E, D)
G = Intersect(b, yAxis)
F = Intersect(xAxis, b)
aa: 1 / x(F)
bb: 1 / y(G)
c = true
A1: A - ((0, n) * inc)
A2: A + ((m, 0) * inc)
f(x) = y(A1) + ((y(A2) - y(A1)) / (x(A2) - x(A1)) * (x - x(A1)))
g(x) = x(A1) + ((x(A2) - x(A1)) / (y(A2) - y(A1)) * (x - y(A1)))
k = Slope(paseo)
listaX = Sequence(Sequence[((k * y(A + ((s + 1 / 2, (-t) - 1 / 2) * inc))) + x(A + ((s + 1 / 2, (-t) - 1 / 2) * inc)) + (k^(2) * x(A1)) - (k * y(A1))) / (1 + k^(2)), s, 0, m - 1], t, 0, n - 1)
listaY = Sequence(Sequence[y(A1) + (k * (Element[Element[listaX, t], s] - x(A1))), s, 1, m], t, 1, n)
lista5 = Sequence(Sequence[If[(Element[Element[listaX, t + 1], s + 1] > x(A) + (s * inc) + 0.001) ∧ (Element[Element[listaX, t + 1], s + 1]  <  x(A) + ((s + 1) * inc) - 0.001) ∧ (Element[Element[listaY, t + 1], s + 1]  <  y(A) - (t * inc) - 0.001) ∧ (Element[Element[listaY, t + 1], s + 1] > y(A) - ((t + 1) * inc) + 0.001), Polygon[A + ((s + 1, (-t)) * inc), A + ((s, (-t)) * inc), 4], Polygon[(1000, 0), (1000, 1), 4]], s, 0, m - 1], t, 0, n - 1)
texto1: "m = " + m
texto2: "n = " + n
lista5b = Sequence(Sequence[If[(((aa * x(A + ((s, (-t)) * inc))) + (bb * y(A + ((s, (-t)) * inc))) - 1) * ((aa * x(A + ((s + 1, (-t) - 1) * inc))) + (bb * y(A + ((s + 1, (-t) - 1) * inc))) - 1))  <  0, Polygon[A + ((s + 1, (-t)) * inc), A + ((s, (-t)) * inc), 4]], s, 0, m - 1], t, 0, n - 1)
lista6 = Union(lista5b, {})
lista5c = Sequence(Sequence[If[(((aa * x(A + ((s, (-t)) * inc))) + (bb * y(A + ((s, (-t)) * inc))) - 1) * ((aa * x(A + ((s + 1, (-t) - 1) * inc))) + (bb * y(A + ((s + 1, (-t) - 1) * inc))) - 1))  <  0, {Polygon[A + ((s + 1, (-t)) * inc), A + ((s, (-t)) * inc), 4]}], s, 0, m - 1], t, 0, n - 1)