Author: Daniel Mentrard

ABG és un triángulo rectángulo en B cuya hipotenusa es AG.
El lado BG es la diagonal del rectángulo BFGC.
Utilizamos por tanto el triángulo rectángulo BFG.

A

B

C

B

G

Calcular AC y luego AG

altura = 2 (slider from 0.1 to 2, step 0.1)
O = (0.12644044126760315, 0.42150680943096314)
Zoom = 0.8 (slider from 0.1 to 5, step 0.1)
Vistas = (2.0495298169595686, 0.1507469334310113)
ya: y(Vistas)
costheta: cos(ya)
B_1 = (-0.5747582119630413, -1.0989140327226123)
Z: (x(B_1) + 0.0, y(B_1) + Zoom * costheta)
w = Vector(B_1, Z)
xa: x(Vistas)
sinphi: sin(xa)
cosphi: cos(xa)
sintheta: sin(ya)
xy: -(Zoom) * cosphi * sintheta
longitud = 1.3 (slider from 0 to 1.3, step 0.1)
X: (x(B_1) + Zoom * sinphi, y(B_1) + xy)
u = Vector(B_1, X)
anchura = 1.2 (slider from 0 to 1.2, step 0.1)
a = OrthogonalLine(Vistas, yAxis)
b = OrthogonalLine(Vistas, xAxis)
c: cos(ya)
Y: (x(B_1) + Zoom * cosphi, y(B_1) + Zoom * sinphi * sintheta)
v = Vector(B_1, Y)
A_2 = Translate(O, Vector[longitud * u])
d = Segment(O, A_2)
B_2 = Translate(O, Vector[anchura * v])
e = Segment(O, B_2)
D_1 = Mirror(B_2, O)
E_1 = Mirror(A_2, O)
h = Segment(D_1, O)
i = Segment(E_1, O)
f = Line(E_1, e)
j = Line(A_2, h)
l = Line(D_1, i)
m = Line(B_2, d)
G = Intersect(f, l)
F = Intersect(l, j)
E = Intersect(j, m)
H = Intersect(m, f)
poly1, i_1, h_1, g, f_1 = Polygon(H, E, F, G)
C_1 = Translate(O, Vector[altura * w])
z = Vector(O, C_1)
D = Translate(H, z)
A = Translate(E, z)
B = Translate(F, z)
C = Translate(G, z)
poly1', i', h', g', f' = Polygon(D, A, B, C)
k = Segment(C, G)
n = Segment(B, F)
p = Segment(A, E)
q = Segment(D, H)
T1: "" + longitud
T2: "" + anchura
J = Midpoint(k)
T3: "" + altura
poly2, g'_1, f_2, h'_1 = Polygon(G, A, B)
K = (3.6185485855746737, 0.46316217496941725)
r = Vector(O, K)
I'_1 = Translate(H, r)
H'_1 = Translate(E, r)
G'_1 = Translate(F, r)
F'_1 = Translate(G, r)
poly1'_1, i'_2, h'_2, g'_2, f'_1 = Polygon(I'_1, H'_1, G'_1, F'_1)
F'_2 = Translate(G, r)
H'' = Translate(A, r)
G'' = Translate(B, r)
poly2', g'', f'_2, h'' = Polygon(F'_2, H'', G'')
s = Segment(H'', H'_1)
t = Segment(G'', G'_1)
Recorte = 0 (slider from 0 to 1.3, step 0.1)
L = Translate(K, Vector[Recorte * w])
u1 = Vector(K, L)
v1 = Vector(O, L)
I'' = Translate(D, v1)
H''_1 = Translate(A, v1)
G''_1 = Translate(B, v1)
F'' = Translate(C, v1)
poly1'', i'', h''_1, g''_1, f'' = Polygon(I'', H''_1, G''_1, F'')
F'_3 = Translate(G, v1)
H''_2 = Translate(A, v1)
G''_2 = Translate(B, v1)
poly2'_1, g''_2, f'_3, h''_2 = Polygon(F'_3, H''_2, G''_2)
a1 = Segment(F'', F'_3)
I''_1 = Translate(D, r)
I'_2 = Translate(H, r)
b1 = Segment(I''_1, I'_2)
c1 = Segment(H''_1, F'')
d1 = Segment(H''_1, F'_3)
poly4, f''_1, h''_3, g''_3 = Polygon(H''_1, G''_1, F'')
poly5, f'_4, g''_4, f''_2 = Polygon(G''_1, F'', F'_3)
e1 = Segment(H'', I''_1)
I''_2 = Translate(D, r)
g1 = Line(I''_1, f'_2)
F''_1 = Translate(C, r)
F'_4 = Translate(G, r)
f1 = Segment(F''_1, F'_4)
h1 = Segment(H'', F''_1)
i1 = Segment(I''_1, F''_1)
poly3, f''_3, i''_1, h''_4 = Polygon(I''_1, H'', F''_1)
I = Midpoint(q)
M = Midpoint(h_1)
N = Midpoint(g)