La fracción es :

Número total de trozos.

Número de trozos en color.

n = 1.8000000000000007 (slider from -5 to 5, step 0.1)
c = 10
b = 11 (slider from 1 to 20, step 1)
a = 6 (slider from 1 to 20, step 1)
A1 = If(b ≥ 1.0, (c * n / b, 0.0))
A0 = (0, 0)
A2 = If(b ≥ 2.0, (2.0 * n * c / b, 0.0))
A3 = If(b ≥ 3.0, (3.0 * n * c / b, 0.0))
A4 = If(b ≥ 4.0, (4.0 * n * c / b, 0.0))
A5 = If(b ≥ 5.0, (5.0 * n * c / b, 0.0))
A6 = If(b ≥ 6.0, (6.0 * n * c / b, 0.0))
A7 = If(b ≥ 7.0, (7.0 * n * c / b, 0.0))
A8 = If(b ≥ 8.0, (8.0 * n * c / b, 0.0))
A9 = If(b ≥ 9.0, (9.0 * n * c / b, 0.0))
B0: (0.0, n)
B1 = If(b ≥ 1.0, (n * c / b, n))
B2 = If(b ≥ 2.0, (2.0 * n * c / b, n))
B3 = If(b ≥ 3.0, (3.0 * n * c / b, n))
B4 = If(b ≥ 4.0, (4.0 * n * c / b, n))
B5 = If(b ≥ 5.0, (5.0 * n * c / b, n))
B6 = If(b ≥ 6.0, (6.0 * n * c / b, n))
B7 = If(b ≥ 7.0, (7.0 * n * c / b, n))
B8 = If(b ≥ 8.0, (8.0 * n * c / b, n))
B9 = If(b ≥ 9.0, (9.0 * n * c / b, n))
P, a0, a1, b1, b0 = Polygon(A0, A1, B1, B0)
Q, a1_1, a2, b2, b1_1 = Polygon(A1, A2, B2, B1)
R, a2_1, a3, b3, b2_1 = Polygon(A2, A3, B3, B2)
S, a3_1, a4, b4, b3_1 = Polygon(A3, A4, B4, B3)
T, a4_1, a5, b5, b4_1 = Polygon(A4, A5, B5, B4)
U, a5_1, a6, b6, b5_1 = Polygon(A5, A6, B6, B5)
V, a6_1, a7, b7, b6_1 = Polygon(A6, A7, B7, B6)
W, a7_1, a8, b8, b7_1 = Polygon(A7, A8, B8, B7)
Y, a8_1, a9, b9, b8_1 = Polygon(A8, A9, B9, B8)
p0 = If(a ≥ 1.0, Polygon[A0, A1, B1, B0])
p1 = If(a ≥ 2.0, Polygon[A1, A2, B2, B1])
p2 = If(a ≥ 3.0, Polygon[A2, A3, B3, B2])
p3 = If(a ≥ 4.0, Polygon[A3, A4, B4, B3])
p4 = If(a ≥ 5.0, Polygon[A4, A5, B5, B4])
p5 = If(a ≥ 6.0, Polygon[A5, A6, B6, B5])
p6 = If(a ≥ 7.0, Polygon[A6, A7, B7, B6])
p7 = If(a ≥ 8.0, Polygon[A7, A8, B8, B7])
p8 = If(a ≥ 9.0, Polygon[A8, A9, B9, B8])
B10 = If(b ≥ 10.0, (10.0 * n * c / b, n))
A10 = If(b ≥ 10.0, (10.0 * n * c / b, 0.0))
p9 = If(a ≥ 10.0, Polygon[A9, A10, B10, B9])
Z, a9_1, a10, b10, b9_1 = Polygon(A9, A10, B10, B9)
T5: a + ""
T6: b + ""
A = (-0.5, 4)
B = (0, 4)
C = (1.5, 4.5)
D = (-0.037037037037037035, 4.214814814814815)
E = (1.5, 3.5)
F = (-0.05185185185185186, 3.740740740740741)
B14 = If(b ≥ 14.0, (14.0 * n * c / b, n))
B16 = If(b ≥ 16.0, (16.0 * n * c / b, n))
B17 = If(b ≥ 17.0, (17.0 * n * c / b, n))
B15 = If(b ≥ 15.0, (15.0 * n * c / b, n))
B11 = If(b ≥ 11.0, (11.0 * n * c / b, n))
B12 = If(b ≥ 12.0, (12.0 * n * c / b, n))
B13 = If(b ≥ 13.0, (13.0 * n * c / b, n))
O = If(b ≥ 16.0, (16.0 * n * c / b, 0.0))
J = If(b ≥ 18.0, (18.0 * n * c / b, n))
G = If(b ≥ 11.0, (11.0 * n * c / b, 0.0))
H = If(b ≥ 15.0, (15.0 * n * c / b, 0.0))
I = If(b ≥ 12.0, (12.0 * n * c / b, 0.0))
K = If(b ≥ 14.0, (14.0 * n * c / b, 0.0))
L = If(b ≥ 13.0, (13.0 * n * c / b, 0.0))
M = If(b ≥ 17.0, (17.0 * n * c / b, 0.0))
N = If(b ≥ 18.0, (18.0 * n * c / b, 0.0))
C1 = If(b ≥ 19.0, (19.0 * n * c / b, 0.0))
D1 = If(b ≥ 20.0, (20.0 * n * c / b, 0.0))
AA, b10_1, b11, g, a10_1 = Polygon(B10, B11, G, A10)
BB, b11_1, b12, i, g_1 = Polygon(B11, B12, I, G)
poly1, b12_1, b13, l, i_1 = Polygon(B12, B13, L, I)
poly2, b13_1, b14, k, l_1 = Polygon(B13, B14, K, L)
poly3, b14_1, b15, h, k_1 = Polygon(B14, B15, H, K)
poly4, b15_1, b16, o, h_1 = Polygon(B15, B16, O, H)
poly5, b16_1, b17, m, o_1 = Polygon(B16, B17, M, O)
poly6, b17_1, j, n_1, m_1 = Polygon(B17, J, N, M)
E1 = If(b ≥ 19.0, (19.0 * n * c / b, n))
F1 = If(b ≥ 20.0, (20.0 * n * c / b, n))
poly7, j_1, e1, c1, n_2 = Polygon(J, E1, C1, N)
poly8, e1_1, f1, d1, c1_1 = Polygon(E1, F1, D1, C1)
G1 = (0, -0.5)
H1 = (18, -0.5)
I1 = Midpoint(G1, H1)
w = Vector(I1, H1)
z = Vector(I1, G1)
T9: "" + b
poly16 = If(a ≥ 11.0, Polygon[B10, B11, G, A10])
J1 = (7.488763577235769, 7.277149918699188)
poly9 = If(a ≥ 12.0, Polygon[B11, B12, I, G])
poly10 = If(a ≥ 13.0, Polygon[B12, B13, L, I])
poly11 = If(a ≥ 14.0, Polygon[B13, B14, K, L])
poly12 = If(a ≥ 15.0, Polygon[B14, B15, H, K])
poly13 = If(a ≥ 16.0, Polygon[B15, B16, O, H])
poly14 = If(a ≥ 17.0, Polygon[B16, B17, M, O])
poly15 = If(a ≥ 18.0, Polygon[B17, J, N, M])
poly17 = If(a ≥ 19.0, Polygon[J, E1, C1, N])
poly18 = If(a ≥ 20.0, Polygon[E1, F1, D1, C1])
K1 = (10.747609467028001, 7.361795266485999)
L1 = (9.097025185185181, -3.451647913279131)
M1 = (9.879994652213187, -3.451647913279131)
d = Segment(L1, M1)
N1 = (5.5, -2.5)
O1 = (10.5, -2.5)
e = Segment(N1, O1)
P1 = (10.5, -4.5)
Q1 = (5.5, -4.5)
poly19, n1, o1, p1_1, q1 = Polygon(N1, O1, P1, Q1)
R1 = (0, 2.5)
S1 = (18, 2.5)
f = Segment(R1, S1)
T1: (x(R1) + f * a / b, y(R1))
U1 = Midpoint(R1, T1)
T2: "" + a
u = Vector(U1, T1)
v = Vector(U1, R1)