Date: 22 Julio 2013

SUMA

SUMA / ADD

+

=

+

=

+

=

Instrucciones:
1)Mueva cada deslizador para representar cada  fracción con su respectivo numerador y denominador.
2) El programa le mostrará la representación pictórica y simbólica de la suma de fracciones, cuando haga click en suma.

mov2 = 0 (slider from 0 to a + c, step 1)
a = 1 (slider from 0 to b, step 1)
b = 4 (slider from 1 to 10, step 1)
mov = 13 (slider from 0 to a * d + b * c, step 1)
C = (2.44419791508772, -9.318217871345602E-4)
V: C + (1, 0)
F: C + (a / b, 0)
d = 5 (slider from 1 to 10, step 1)
nrojos = If(mov ≤ a * d, 0, If[mov ≤ b * d, mov - a * d, b * d - a * d])
K: C + (1, 0) + 1 / d * (0, floor(nrojos / (b - a)))
J: F + 1 / d * (0, ceil(nrojos / (b - a)))
L: J + 1 / b * (Mod[nrojos, b - a], 0)
M: (x(L), y(K))
c = 2 (slider from 0 to d, step 1)
B_1 = (1.2156772907165079, -9.318217871345602E-4)
B_4: B_1 + (0, 1)
B_3: B_1 + (1, 1)
B_5: B_1 + (0, c / d)
B_6: B_5 + (1, 0)
B_2: B_1 + (1, 0)
A_1 = (0, 0)
A_3: A_1 + (1, 1)
A_2: A_1 + (1, 0)
A_5: A_1 + (a / b, 0)
A_6: A_5 + (0, 1)
A_4: A_1 + (0, 1)
D = (3.5628839141012416, 0.0031361273001873366)
a_1 = Segment(A_1, A_4)
lista1 = Sequence(Segment[Translate[A_1, (i / b, 0)], Translate[A_4, (i / b, 0)]], i, 1, b - 1)
b_2 = Segment(B_1, B_2)
lista2 = Sequence(Segment[Translate[B_1, (0, i / d)], Translate[B_2, (0, i / d)]], i, 1, d - 1)
lista1' = Translate(lista1, Vector[A_1, C])
lista1'_1 = Translate(lista1, Vector[A_1, D])
lista2' = Translate(lista2, Vector[B_1, C])
lista2'_1 = Translate(lista2, Vector[B_1, D])
a_2 = Segment(A_1, A_2)
b_1 = Segment(B_1, B_4)
k = 4 (slider from 1 to 10, step 1)
j = 5 (slider from 1 to 10, step 1)
polígono1, i, l, m, a_6, a_7 = Polygon(A_1, A_5, A_6, A_4, A_1)
polígono2, e, g, n, p, q = Polygon(B_1, B_2, B_6, B_5, B_1)
lista3 = Sequence(Segment[Translate[A_1, (0, i / j)], Translate[A_2, (0, i / j)]], i, 1, j - 1)
polígono3, b_7, d_1, e_1, f_1, b_3 = Polygon(B_1, B_1 + (c / d, 0), B_1 + (c / d, 1), B_1 + (0, 1), B_1)
se = If(b ≠ d, k, b)
lista4 = Sequence(Segment[Translate[B_1, (i / se, 0)], Translate[B_4, (i / se, 0)]], i, 1, se - 1)
g_1 = Segment(C, C + (1, 0))
h_1 = Segment(C, C + (0, 1))
i_1 = Segment(C + (1, 0), C + (1, 1))
j_1 = Segment(C + (0, 1), C + (1, 1))
k_1 = Segment(D, D + (1, 0))
l_1 = Segment(D, D + (0, 1))
m_1 = Segment(D + (1, 0), D + (1, 1))
n_1 = Segment(D + (0, 1), D + (1, 1))
nazules = If(mov ≤ a * d, mov, a * d)
nrojos2 = If(mov ≤ b * d, 0, mov - b * d)
E: C + 1 / d * (0, ceil(nazules / a))
G: C + (a / b, 1 / d * floor(nazules / a))
H: E + 1 / b * (Mod[nazules, a], 0)
I: (x(H), y(G))
polígono8, r, s, t, p_1, q_1, r_1, s_1 = Polygon(F, J, L, M, K, V, F)
polígono7, e_3, c_3, f_3, g_3, i_3, h_3 = Polygon(E, C, F, G, I, H)
N: D + 1 / d * (0, ceil(nrojos2 / b))
O: D + (1, 0) + 1 / d * (0, floor(nrojos2 / b))
P: N + 1 / b * (Mod[nrojos2, b], 0)
Q: (x(P), y(O))
polígono9, d_3, n_3, p_2, q_2, o, r_2, d_4 = Polygon(D, N, P, Q, O, D + (1, 0), D)
A_7: A_6 - 1 / d * (0, ceil(nazules / a))
A_{10}: A_4 - (0, 1 / d * floor(nazules / a))
A_8: A_7 - 1 / b * (Mod[nazules, a], 0)
A_9: (x(A_8), y(A_{10}))
polígono13, a_{10}, b_4, q_4, r_4, s_4, t_4, b_5 = Polygon(A_4, A_6, A_7, A_8, A_9, A_{10}, A_4)
B_7: B_6 - 1 / d * (0, ceil((nrojos + nrojos2) / b))
B_9: B_5 - 1 / d * (0, floor((nrojos + nrojos2) / b))
B_8: B_7 - 1 / b * (Mod[nrojos + nrojos2, b], 0)
B_{10}: (x(B_8), y(B_9))
polígono14, v, z, a_5, w, c_4, p_4, v_1 = Polygon(B_7, B_8, B_{10}, B_9, B_1 + (0, c / d), B_1 + (1, c / d), B_7)
a_{11} = Segment(A_2, A_3)
a_9 = Segment(A_3, A_4)
a_4 = Segment(B_4, B_3)
a_3 = Segment(B_2, B_3)
topemov = If(b ≠ d, a * d + b * c, a + d)
polígono4, a_8, a_{12}, a_{13}, a_{14}, a_{15} = Polygon(A_1, A_2, A_3, A_4, A_1)
polígono5, b_6, b_8, b_9, b_{10}, b_{11} = Polygon(B_1, B_2, B_3, B_4, B_1)
polígono6, c_1, v_2, f, h, c_2 = Polygon(C, V, V + (0, 1), C + (0, 1), C)
polígono10, t_1, d_2, e_2, l_2, m_2 = Polygon(D, D + (1, 0), D + (1, 1), D + (0, 1), D)
azu = If(mov2 ≤ a, mov2, a)
A: C + 1 / b * (azu, 0)
polígono11, c_5, a_{16}, f_2, g_2, c_6 = Polygon(C, A, A + (0, 1), C + (0, 1), C)
roj = If(mov2 ≤ a, 0, If[mov2 ≤ b, mov2 - a, b - a])
B: A + 1 / b * (roj, 0)
polígono12, a_{17}, b_{12}, h_2, i_2, a_{18} = Polygon(A, B, B + (0, 1), A + (0, 1), A)
roj2 = If(mov2 ≤ b, 0, mov2 - b)
R: D + 1 / b * (roj2, 0)
polígono15, d_6, r_3, j_2, k_2, d_7 = Polygon(D, R, R + (0, 1), D + (0, 1), D)
B_{11}: B_1 + (c / d, 0)
A_{11}: A_5 - 1 / b * (azu, 0)
B_{12}: B_{11} - 1 / b * (roj + roj2, 0)
polígono16, b_{13}, b_{14}, n_2, s_2, b_{15} = Polygon(B_{12}, B_{11}, B_{11} + (0, 1), B_{12} + (0, 1), B_{12})
polígono17, a_{19}, t_2, a_{20}, a_{21}, a_{22} = Polygon(A_{11}, A_{11} + (0, 1), A_6, A_5, A_{11})
texto6: "$ \frac{" + (LaTeX[a]) + "}{" + (LaTeX[b]) + "} $"
texto6_1: "$ \frac{" + (LaTeX[c]) + "}{" + (LaTeX[d]) + "} $"
texto6_2: "$ \frac{" + (LaTeX[a * j]) + "}{" + (LaTeX[b * j]) + "} $"
texto6_3: "$ \frac{" + (LaTeX[c * k]) + "}{" + (LaTeX[d * k]) + "} $"
texto6_4: "$ \frac{" + (LaTeX[a * d + b * c]) + "}{" + (LaTeX[b * d]) + "} $"
texto1: "$ \frac{" + (LaTeX[a + c]) + "}{" + (LaTeX[b]) + "} $"