En este proceso se pueden observar dos formas
de cómo construir un cuadrado, 
a partir de cualquier cuadrilátero,
cuyos vértices se sitúen en un haz de rectas paralelas
procedentes de los vértices del cuadrilátero.

A = (-4.11304854054643, 3.6690907216543915)
B = (-0.23053012900186637, 2.0601191276809687)
C = (1.028665031499073, 5.033218812197076)
D = (-1.2448817860720676, 8.46102786022741)
poly1, a, b, c', d' = Polygon(A, B, C, D)
c = Segment(A, C)
E = Midpoint(c)
d = Segment(D, B)
C_1 = Midpoint(d)
e = Line(C_1, E)
g = Line(A, e)
h = Line(B, e)
i = Line(C, e)
f = Line(D, g)
O1 = Point(e)
j = OrthogonalLine(O1, e)
A_1 = Intersect(h, j)
k = Circle(O1, A_1)
D_1 = Intersect(k, e, 2)
m = Line(D_1, j)
A1 = Intersect(g, m)
p = Circle(O1, A1)
B1_1 = Intersect(p, h, 2)
D1_1 = Intersect(p, f, 2)
B1 = If(Distance[A1, B1_1] > Distance[A1, D1_1], B1_1, D1_1)
l = Segment(A1, B1)
n = OrthogonalLine(B1, l)
C1 = Intersect(i, n)
q = OrthogonalLine(C1, n)
r = OrthogonalLine(A1, l)
D1 = Intersect(r, q)
poly2, a_1, b_1, d_1, f_1 = Polygon(A1, B1, C1, D1)
F = Midpoint(d')
G = Midpoint(b)
s = Line(F, G)
O2 = Point(s)
t = Line(D, s)
c_1 = Line(C, s)
e_1 = Line(B, s)
g_1 = Line(A, s)
h_1 = OrthogonalLine(O2, s)
H = Intersect(t, h_1)
k_1 = Circle(O2, H)
I = Intersect(k_1, s, 2)
i_1 = Line(I, h_1)
B2 = Intersect(e_1, i_1)
p_1 = Circle(O2, B2)
D2 = Intersect(p_1, t, 2)
C2 = Intersect(p_1, c_1, 1)
A2 = Intersect(p_1, g_1, 1)
poly3, a2, b2, c2, d2 = Polygon(B2, D2, C2, A2)