<<

>>

<<

>>

n1 = 34 (slider from 1 to 100, step 1)
d1 = 4 (slider from 1 to r1, step 1)
E4 = Corner(4)
E1: Corner[4] - (0, 600 / 55)
E2: E1 + (740 / 60, 0)
n: n1
d: d1
c = Div(n, d)
control = Min((x(E2) - x(E1) - 2.5) / d, (y(E4) - y(E1) - 3) / c)
r = Mod(n, d)
an = If(control  <  1, control, 1)
A: E1 + (3, 1.3) - (an / 2, an / 2)
C: A + (an * (d, d))
D: A + (an * (0, d))
B: A + (an * (d, 0))
polígono1, a, b, c_1, d_1 = Polygon(A, B, C, D)
cota1 = Vector(B + (0.2, 0.2), C + (0.2, 0))
cota2 = Vector(C + (0.2, -0.2), B + (0.2, 0))
cota3 = Vector(A - (-0.2, 0.2), B - (0, 0.2))
cota4 = Vector(B - (0.2, 0.2), A - (0, 0.2))
E: A + (an * (r, c))
lista2 = Sequence(Circle[(x(E1) + (k * an) + 1, y(E1) + (c * an) + 1.3), an / 2], k, 0, r - 1)
lista1 = Sequence(Sequence[Circle[(x(E1) + (k * an) + 1, y(E1) + (j * an) + 1.3), an / 2], k, 0, d - 1], j, 0, c - 1)
Ptex = If(y(C + D) / 2  <  4, (C + D) / 2 + (-1, 1), (B + C) / 2 + (3, 0))
texto10: " " + n + " es un cuadrado perfecto"
texto7: "\sqrt{" + (LaTeX[n]) + "}=" + (LaTeX[d]) + ""
texto2: "" + (LaTeX[d]) + "x" + (LaTeX[d]) + "=" + (LaTeX[d]) + "^2=" + (LaTeX[n]) + ""
texto8: "N = " + n + ""
texto4_1: " " + d + ""
r1 = If(floor(sqrt(n))^(2) ≟ n, sqrt(n), floor(sqrt(n)) + 1)
E3: Corner[4] + (740 / 60, 0)
lista1a = Sequence(Sequence[Circle[(x(E1) + (k * an) + 3, y(E1) + (j * an) + 1.3), an / 2], k, 0, d - 1], j, 0, c - 1)
lista2a = Sequence(Circle[(x(E1) + (k * an) + 3, y(E1) + (c * an) + 1.3), an / 2], k, 0, r - 1)
texto1: "r = " + d + ""
texto5_1: "r = " + d + ""