I = (8.538484216779644, -1.926994336667641)
J = (14.933782571202514, -1.9485125754203092)
A = (-4.9699494717224635, -4.391797940565376)
B = (6.405441701496928, -4.387245004408758)
a, b, c, d, C, D, E, F, G, H = carré_milieu(A, B)

Tool: carré_milieu
carré_milieu[ <Point>, <Point> ]
Input: A, B
Output: e, f, g, h, C, D, F, G, H, E

poly1, a, b, c, d, C, D = Polygon(A, B, 4)
E = Midpoint(c)
F = Midpoint(b)
G = Midpoint(a)
H = Midpoint(d)
e = Segment(D, C)
f = Segment(C, B)
g = Segment(B, A)
h = Segment(A, D)