Fractions equivalentes
Author: Daniel Mentrard

Denom = 30 (slider from 1 to 50, step 1)
n = 1 (slider from 1 to 5, step 1)
L1 = Sequence(Polygon[(i, 0.0), (i + n, 0.0), 4.000000000000003], i, 0.0, n * (Denom - 1.0), n)
L2 = Sequence(Segment[(i, 0.0), (i + n, 0.0)], i, 0.0, n * (Denom - 1.0), n)
L3 = Sequence(Segment[(i, 0.0), (i, n)], i, 0.0, n * Denom, n)
L4 = Sequence(Segment[(i, n), (i + n, n)], i, 0.0, n * (Denom - 1.0), n)
Num = 22 (slider from 0 to 50, step 1)
L5 = Sequence(Polygon[(i, n), (i + n, n), 4.000000000000004], i, 0.0, n * (Num - 1.0), n)
L6 = Sequence(Segment[(i, n), (i + n, n)], i, 0.0, n * (Num - 1.0), n)
L7 = Sequence(Segment[(i, n), (i, n + n)], i, 0.0, n * Num, n)
L8 = Sequence(Segment[(i, 2.0 * n), (i + n, 2.0 * n)], i, 0.0, n * (Num - 1.0), n)
texte1: "" + Num
texte2: "" + Denom
A = (-2.090373571959696, 1.0149681109483202)
B = (-0.3353796725336412, 1.0149681109483202)
a = Segment(A, B)
b = GCD(Num, Denom)
liste1 = Sequence(Polygon[(i, -1.0 * 8.0), (i + n, -1.0 * 8.0), 4.000000000000015], i, 0.0, n * (Denom - 1.0), n)
liste2 = Sequence(Segment[(i, -1.0 * 8.0), (i + n, -1.0 * 8.0)], i, 0.0, n * (Denom - 1.0), n)
liste3 = Sequence(Segment[(i, -1.0 * 8.0 + n), (i + n, -1.0 * 8.0 + n)], i, 0.0, n * (Denom - 1.0), n)
liste4 = Sequence(Segment[(i, -1.0 * 8.0), (i, -1.0 * 8.0 + n)], i, 0.0, n * Denom, b * n)
liste5 = Sequence(Polygon[(i, -1.0 * 8.0 + n), (i + n, -1.0 * 8.0 + n), 4.000000000000005], i, 0.0, n * (Num - 1.0), n)
liste6 = Sequence(Segment[(i, -1.0 * 8.0 + n), (i + n, -1.0 * 8.0 + n)], i, 0.0, n * (Num - 1.0), n)
liste7 = Sequence(Segment[(i, -1.0 * 8.0 + n), (i, -1.0 * 8.0 + n + n)], i, 0.0, n * Num, n * b)
liste8 = Sequence(Segment[(i, -1.0 * 8.0 + 2.0 * n), (i + n, -1.0 * 8.0 + 2.0 * n)], i, 0.0, n * (Num - 1.0), n)
texte3: "" + (Num / b)
texte4: "" + (Denom / b)
C = (-2.07226135078285, -6.973757561925257)
D = (-0.42400081946897816, -6.973757561925257)
c = Segment(C, D)