Author: Daniel Mentrard

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

+

Tenemos que ayudar al jardinero a contar las coles que quiere plantar

Filas = 7 (slider from 1 to 9, step 1)
A = (-0.5, 7)
B: (x(A) + 0.5 + Filas / 2.0, 7.0)
r = 0.21999999999999997 (slider from 0 to 1, step 0.01)
Coles = 12 (slider from 0 to 12, step 1)
list3 = Sequence(Sequence[Circle[(x(A) - 0.5 + j / 2.0, y(A) + 0.5 - i / 2.0), r], j, 1.0, Filas / Filas], i, 1.0, Coles)
C: (x(A) + Filas / 2.0, y(A) - Coles / 5.0)
E: (x(A), y(A) + 0.5 - Coles / 2.0)
d = Line(E, xAxis)
e = Line(A, yAxis)
f = Line(A, d)
k = Circle(A, 2.0 * r)
t = Circle(E, 2.0 * r)
H, I = Intersect(k, e)
J, K = Intersect(k, f)
L, M = Intersect(t, d)
B_1 = Midpoint(J, L)
m = Vector(B_1, J)
n = Vector(B_1, L)
M_1, N_1 = Intersect(t, e)
F = Mirror(A, K)
L1 = Sequence(Sequence[Circle[(x(F) - 0.5 + j / 2.0, y(F) + 0.5 - i / 2.0), r], j, 1.0, 1.0], i, 1.0, Coles)
G = Mirror(K, F)
R = Mirror(F, G)
L2 = Sequence(Sequence[Circle[(x(R) - 0.5 + j / 2.0, y(R) + 0.5 - i / 2.0), r], j, 1.0, 1.0], i, 1.0, Coles)
S = Mirror(G, R)
T = Mirror(R, S)
L3 = Sequence(Sequence[Circle[(x(T) - 0.5 + j / 2.0, y(T) + 0.5 - i / 2.0), r], j, 1.0, 1.0], i, 1.0, Coles)
U = Mirror(S, T)
V = Mirror(T, U)
L4 = Sequence(Sequence[Circle[(x(V) - 0.5 + j / 2.0, y(V) + 0.5 - i / 2.0), r], j, 1.0, 1.0], i, 1.0, Coles)
W = Mirror(U, V)
A1 = Mirror(V, W)
B1 = Mirror(W, A1)
C1 = Mirror(A1, B1)
D1 = Mirror(B1, C1)
E1 = Mirror(C1, D1)
F1 = Mirror(D1, E1)
G1 = Mirror(E1, F1)
L5 = Sequence(Sequence[Circle[(x(A1) - 0.5 + j / 2.0, y(A1) + 0.5 - i / 2.0), r], j, 1.0, 1.0], i, 1.0, Coles)
L6 = Sequence(Sequence[Circle[(x(C1) - 0.5 + j / 2.0, y(C1) + 0.5 - i / 2.0), r], j, 1.0, 1.0], i, 1.0, Coles)
L7 = Sequence(Sequence[Circle[(x(E1) - 0.5 + j / 2.0, y(E1) + 0.5 - i / 2.0), r], j, 1.0, 1.0], i, 1.0, Coles)
L8 = Sequence(Sequence[Circle[(x(G1) - 0.5 + j / 2.0, y(G1) + 0.5 - i / 2.0), r], j, 1.0, 1.0], i, 1.0, Coles)
N = Midpoint(K, M)
i = Line(B_1, N)
O = Mirror(G, i)
P = Mirror(S, i)
Q = Mirror(U, i)
J1 = Mirror(B1, i)
K1 = Mirror(D1, i)
M1 = Mirror(F1, i)
D = Mirror(F1, G1)
Z = Mirror(G1, D)
c = Circle(G1, 2.0 * r)
H1 = Mirror(G1, i)
g = Circle(H1, 2.0 * r)
h = Line(G1, H1)
I1, N1 = Intersect(c, h)
O1, P1 = Intersect(g, d)
Q1, R1 = Intersect(g, h)
S1 = Midpoint(G, O)
T1 = Midpoint(P, S)
U1 = Midpoint(U, Q)
V1 = Mirror(U, i)
W1 = Mirror(W, i)
Z1 = Midpoint(W, W1)
A2 = Midpoint(J1, B1)
B2 = Midpoint(D1, K1)
C2 = Midpoint(F1, O1)
T11: "" + Coles
T12: "" + Coles
T13: "" + Coles
T14: "" + Coles
T15: "" + Coles
T16: "" + Coles
T17: "" + Coles
T18: "" + Coles
T19: "" + Coles
j = Line(G, O)
l = Line(Q, U)
p = Line(K, M)
D2 = Mirror(E, N_1)
q = Line(D2, d)
E2 = Intersect(p, q)
F2 = Mirror(D2, E2)
G2 = Mirror(E2, F2)
H2 = Mirror(F2, G2)
I2 = Mirror(G2, H2)
J2 = Mirror(H2, I2)
K2 = Mirror(I2, J2)
M2 = Mirror(J2, K2)
N2 = Mirror(K2, M2)
O2 = Mirror(M2, N2)
P2 = Mirror(N2, O2)
Q2 = Mirror(O2, P2)
R2 = Mirror(P2, Q2)
S2 = Mirror(Q2, R2)
U2 = Mirror(R2, S2)
V2 = Intersect(q, h)
bb: Filas * (x(D) - x(H)) / 10.0
W2: (x(H) - 2.0 * r + Filas * (x(D) - x(K)) / 8.0, y(H))
Z2 = Midpoint(H, W2)
u = Vector(Z2, W2)
v = Vector(Z2, H)
T28: " " + Filas + " x " + Coles + " = " + (Coles * Filas)
text6: "" + Filas + " fila(s)"
text9: "" + Coles + " coles"
T23: " Hay  " + Filas + " filas de " + Coles + " coles."
text3: "o sea  " + Filas + " x " + Coles + " = " + (Coles * Filas) + " coles"