A = (1.8565, -0.88478)
B = (9.60498, -0.911)
a = Segment(A, B)
b = OrthogonalLine(A, a)
C = Point(b)
c = OrthogonalLine(C, b)
d = OrthogonalLine(B, a)
D = Intersect(c, d)
polígono1, b_1, a_1, c_1, d_1 = Polygon(B, A, C, D)
P = Point(a)
P' = Mirror(P, a_1)
P'' = Mirror(P', c_1)
P''' = Mirror(P'', d_1)
e = Segment(P''', P)
S = Intersect(e, d_1)
f = Segment(P'', S)
R = Intersect(f, c_1)
g = Segment(P', R)
Q = Intersect(g, a_1)
h = Segment(P, Q)
polígono2, p, g_1, f_1, e_1 = Polygon(P, Q, R, S)
perímetropolígono2 = Perimeter(polígono2)
Textopolígono2: "Perímetro de  " + (Name[P]) + (Name[Q]) + (Name[R]) + (Name[S]) + " = " + perímetropolígono2
P'_1 = Mirror(P, a_1)
H = Mirror(P'_1, c_1)
E = Point(d_1)
F = Point(c_1)
G = Point(a_1)
polígono3, p_1, e_2, f_2, g_2 = Polygon(P, E, F, G)
E' = Mirror(E, d_1)
F' = Mirror(F, d_1)
i = Segment(E', F')
F'_1 = Mirror(F, c_1)
G' = Mirror(G, c_1)
j = Segment(F'_1, G')
I = Mirror(F'_1, d_1)
G'' = Mirror(G', d_1)
j' = Segment(I, G'')
G'_1 = Mirror(G, a_1)
P'_2 = Mirror(P, a_1)
k = Segment(G'_1, P'_2)
J = Mirror(G'_1, c_1)
K = Mirror(P'_2, c_1)
k' = Segment(J, K)
J' = Mirror(J, d_1)
K' = Mirror(K, d_1)
k'' = Segment(J', K')
l = Segment(P, P''')
m = PolyLine(P, E, F', G'', P''')