A = (2.48, -2.24)
B = (7.04, -2.4)
P = (4.24, -0.16)
v = 4 (slider from 3 to 5, step 1)
n: round(v)
texto1: "Nº Vértices = " + n
polígono1, a, a_1, b, C_1 = Polygon(A, B, 3.0)
c = Line(A, B)
d = Line(A, C_1)
e = Line(B, C_1)
f = OrthogonalLine(P, d)
g = OrthogonalLine(P, e)
h = OrthogonalLine(P, c)
D_1 = Intersect(c, h)
E = Intersect(g, e)
F = Intersect(d, f)
i = Segment(P, E)
j = Segment(P, D_1)
k = Segment(P, F)
suma3: i + j + k
p = Circle(A, B)
C = Point(p)
q = Circle(C, A)
r = Circle(B, A)
H = Intersect(q, r, 1.0)
l = Segment(A, C)
m = Segment(C, H)
s = Segment(H, B)
lista1: {Polygon[A, B, H, C]}
t = Line(C, A)
b_1 = Line(C, H)
c_1 = Line(H, B)
d_1 = OrthogonalLine(P, c_1)
e_1 = OrthogonalLine(P, b_1)
G = Intersect(e_1, b_1)
I = Intersect(e_1, c)
J = Intersect(d_1, c_1)
K = Intersect(d_1, t)
g_1 = Segment(P, G)
f_1 = Segment(P, K)
i_1 = Segment(P, J)
suma4: f_1 + g_1 + j + i_1
h_1 = Circle(C, A)
k_1 = Circle(B, A)
D = Point(k_1)
j_1 = Segment(D, B)
p_1 = Circle(D, B)
M = Intersect(h_1, p_1, 1.0)
l_1 = Segment(C, M)
m_1 = Segment(M, D)
n_1 = Line(C, M)
q_1 = Line(M, D)
r_1 = Line(D, B)
lista2: {Polygon[A, B, D, M, C]}
s_1 = OrthogonalLine(P, n_1)
t_1 = OrthogonalLine(P, q_1)
a_2 = OrthogonalLine(P, r_1)
L = Intersect(s_1, n_1)
N = Intersect(t_1, q_1)
O = Intersect(a_2, r_1)
b_2 = Segment(P, L)
c_2 = Segment(P, N)
d_2 = Segment(P, O)
suma5: b_2 + c_2 + d_2 + j + f_1
suma = Element({suma3, suma4, suma5}, n - 2.0)
texto2: "Suma = " + suma