Author: Daniel Mentrard

O es el centro del cuadrado rojo (punto de intersección de las diagonales).
El recorte se hace según rectas paralelas a los lados del cuadrado mayor.

Henri Perigal:  matemático británico (1801 - 1898)

θ = 0 (slider from 0 to 5, step 0.05)
A = (4.371660494933819, 3.746482884888388)
B = (9.279442973497732, 3.7574448314294733)
poly1, C = Outil1(A, B)
poly2, a, b, c, e, D, E = Polygon(A, C, 4.0)
poly3, d, f_1, g_1, h_1, F, G = Polygon(C, B, 4.0)
poly4, i_1, j_1, k, l, H, I = Polygon(B, A, 4.0)
m = Line(E, C)
n = Line(D, A)
O = Intersect(m, n)
p = OrthogonalLine(O, i_1)
q = OrthogonalLine(O, p)
K = Intersect(p, c)
L = Intersect(q, b)
M = Intersect(p, a)
N_1 = Intersect(q, e)
poly5, k_1, j_5, n_1, e_1 = Polygon(K, O, N_1, E)
poly6, d_1, k_2, j_2, l_1 = Polygon(D, K, O, L)
poly7, c_1, m_1, j_3, l_2 = Polygon(C, M, O, L)
poly8, a_1, m_2, j_4, n_2 = Polygon(A, M, O, N_1)
u = Vector(O, A)
v = Vector(O, H)
w = Vector(O, I)
z = Vector(O, B)
C': C + If[θ < 1.0, θ, 1.0] * Vector[O, A]
M': M + If[θ < 1.0, θ, 1.0] * Vector[O, A]
J': O + If[θ < 1.0, θ, 1.0] * Vector[O, A]
L': L + If[θ < 1.0, θ, 1.0] * Vector[O, A]
poly7', c', m', j', l' = Polygon(C', M', J', L')
A': A + If[θ ≥ 1.0 ∧ θ < 2.0, θ - 1.0, 1.0] * If[θ < 1.0, 0.0, 1.0] * z
M'_1: M + If[θ ≥ 1.0 ∧ θ < 2.0, θ - 1.0, 1.0] * If[θ < 1.0, 0.0, 1.0] * z
J'_1: O + If[θ ≥ 1.0 ∧ θ < 2.0, θ - 1.0, 1.0] * If[θ < 1.0, 0.0, 1.0] * z
N': N_1 + If[θ ≥ 1.0 ∧ θ < 2.0, θ - 1.0, 1.0] * If[θ < 1.0, 0.0, 1.0] * z
poly8', a', m'_1, j'_1, n' = Polygon(A', M'_1, J'_1, N')
K': K + If[θ ≥ 2.0 ∧ θ < 3.0, θ - 2.0, 1.0] * If[θ < 2.0, 0.0, 1.0] * w
J'_2: O + If[θ ≥ 2.0 ∧ θ < 3.0, θ - 2.0, 1.0] * If[θ < 2.0, 0.0, 1.0] * w
N'_1: N_1 + If[θ ≥ 2.0 ∧ θ < 3.0, θ - 2.0, 1.0] * If[θ < 2.0, 0.0, 1.0] * w
E': E + If[θ ≥ 2.0 ∧ θ < 3.0, θ - 2.0, 1.0] * If[θ < 2.0, 0.0, 1.0] * w
poly5', k', j'_2, n'_1, e' = Polygon(K', J'_2, N'_1, E')
D': D + If[θ ≥ 3.0 ∧ θ < 4.0, θ - 3.0, 1.0] * If[θ < 3.0, 0.0, 1.0] * v
K'_1: K + If[θ ≥ 3.0 ∧ θ < 4.0, θ - 3.0, 1.0] * If[θ < 3.0, 0.0, 1.0] * v
L'_1: L + If[θ ≥ 3.0 ∧ θ < 4.0, θ - 3.0, 1.0] * If[θ < 3.0, 0.0, 1.0] * v
J'_3: O + If[θ ≥ 3.0 ∧ θ < 4.0, θ - 3.0, 1.0] * If[θ < 3.0, 0.0, 1.0] * v
poly6', d', k'_1, j'_3, l'_1 = Polygon(D', K'_1, J'_3, L'_1)
r = Vector(C, D')
C'_1: C + If[θ ≥ 4.0 ∧ θ < 5.0, θ - 4.0, 1.0] * If[θ < 4.0, 0.0, 1.0] * r
B': B + If[θ ≥ 4.0 ∧ θ < 5.0, θ - 4.0, 1.0] * If[θ < 4.0, 0.0, 1.0] * r
F': F + If[θ ≥ 4.0 ∧ θ < 5.0, θ - 4.0, 1.0] * If[θ < 4.0, 0.0, 1.0] * r
G': G + If[θ ≥ 4.0 ∧ θ < 5.0, θ - 4.0, 1.0] * If[θ < 4.0, 0.0, 1.0] * r
poly3', c'_1, b', f', g' = Polygon(C'_1, B', F', G')

Tool: Outil1
Input: A, B
Output: poly1, C

c = Semicircle(A, B)
C = Point(c)
poly1, b, a, c_1 = Polygon(A, C, B)