Ver esquema

Remarcar baldosas cruzadas

nn = 10 (slider from 1 to 60, step 1)
mm = 12 (slider from 1 to 72, step 1)
m: round(mm)
n: round(nn)
ancho: x(Corner[3.0] - Corner[4.0])
alto: y(Corner[4.0] - Corner[1.0])
A: Corner[4.0] + (ancho, -1.0 * alto) / 10.0 + (0.5, 0.0)
inc = Min(0.8 * ancho / m, 0.8 * alto / n)
lista1 = Sequence(Sequence[Translate[losa, s * (inc, 0.0) - t * (0.0, inc)], s, 0.0, m - 1.0], t, 0.0, n - 1.0)
paseo = Segment(A - (0.0, n) * inc, A + (m, 0.0) * inc)
lista2 = Sequence(Segment[A + (s, 0.0) * inc, A + (s, -1.0 * n) * inc], s, 0.0, m)
lista3 = Sequence(Segment[A + (0.0, -1.0 * s) * inc, A + (m, -1.0 * s) * inc], s, 0.0, n)
lista4: {Polygon[A, A + (m, 0.0) * inc, A + (m, -1.0 * n) * inc, A + (0.0, -1.0 * n) * inc]}
a = true
D: A + (m, 0.0) * inc
E: A + (0.0, -1.0 * n) * inc
b = Line(E, D)
G = Intersect(b, yAxis)
F = Intersect(xAxis, b)
aa: 1.0 / x(F)
bb: 1.0 / y(G)
c = true
A1: A - (0.0, n) * inc
A2: A + (m, 0.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.0 / 2.0, -(t) - 1.0 / 2.0) * inc) + x(A + (s + 1.0 / 2.0, -(t) - 1.0 / 2.0) * inc) + k^(2.0) * x(A1) - k * y(A1)) / (1.0 + k^(2.0)), s, 0.0, m - 1.0], t, 0.0, n - 1.0)
listaY = Sequence(Sequence[y(A1) + k * (Element[Element[listaX, t], s] - x(A1)), s, 1.0, m], t, 1.0, n)
lista5 = Sequence(Sequence[If[Element[Element[listaX, t + 1.0], s + 1.0] > x(A) + s * inc + 0.0010 ∧ Element[Element[listaX, t + 1.0], s + 1.0] < x(A) + (s + 1.0) * inc - 0.0010 ∧ Element[Element[listaY, t + 1.0], s + 1.0] < y(A) - t * inc - 0.0010 ∧ Element[Element[listaY, t + 1.0], s + 1.0] > y(A) - (t + 1.0) * inc + 0.0010, Polygon[A + (s + 1.0, -1.0 * t) * inc, A + (s, -1.0 * t) * inc, 4.0], Polygon[(1000.0, 0.0), (1000.0, 1.0), 4.0]], s, 0.0, m - 1.0], t, 0.0, n - 1.0)
texto1: "m = " + m
texto2: "n = " + n
lista5b = Sequence(Sequence[If[(aa * x(A + (s, -1.0 * t) * inc) + bb * y(A + (s, -1.0 * t) * inc) - 1.0) * (aa * x(A + (s + 1.0, -1.0 * t - 1.0) * inc) + bb * y(A + (s + 1.0, -1.0 * t - 1.0) * inc) - 1.0) < 0.0, Polygon[A + (s + 1.0, -1.0 * t) * inc, A + (s, -1.0 * t) * inc, 4.0]], s, 0.0, m - 1.0], t, 0.0, n - 1.0)
lista6 = Union(lista5b, {})
lista5c = Sequence(Sequence[If[(aa * x(A + (s, -1.0 * t) * inc) + bb * y(A + (s, -1.0 * t) * inc) - 1.0) * (aa * x(A + (s + 1.0, -1.0 * t - 1.0) * inc) + bb * y(A + (s + 1.0, -1.0 * t - 1.0) * inc) - 1.0) < 0.0, {Polygon[A + (s + 1.0, -1.0 * t) * inc, A + (s, -1.0 * t) * inc, 4.0]}], s, 0.0, m - 1.0], t, 0.0, n - 1.0)