Estadio de Bunimóvich

r: 4
A: ((-r), r)
B: (r, r)
c2 = Segment(A, B)
C: ((-r), (-r))
c1 = Semicircle(C, A)
D: (r, (-r))
c3 = Semicircle(B, D)
c4 = Segment(C, D)
P = (7.019431126738705, -2.623554015239906)
A1: P
V = (0.30909090909090864, 1.2248025099367732)
B1: V
C1 = Ray(A1, Vector[B1])
D1: RemoveUndefined[{Intersect[c1, C1], Intersect[c2, C1], Intersect[c3, C1], Intersect[c4, C1]}] \ {A1}
E1 = If(D1(1) ≟ A1, D1(2), D1(1))
F1 = If(E1 ∈ c2, Line[A, B], E1 ∈ c4, Line[C, D], E1 ∈ c3, Tangent[E1, c3], Tangent[E1, c1])
A2: E1
f = Ray(P, Vector[V])
listaCurvas: {c1, c2, c3, c4}
P0 = Point(listaCurvas)
V0 = (0.30909090909090864, 1.2248025099367732)
v0 = Vector(V0)
G1 = Mirror(E1 + B1, F1)
B2: (G1 - A2) / abs(G1 - A2)
C2 = Ray(A2, Vector[B2])
D2: RemoveUndefined[{Intersect[c1, C2], Intersect[c2, C2], Intersect[c3, C2], Intersect[c4, C2]}] \ {A2}
E2 = If(D2(1) ≟ A2, D2(2), D2(1))
F2 = If(E2 ∈ c2, Line[A, B], E2 ∈ c4, Line[C, D], E2 ∈ c3, Tangent[E2, c3], Tangent[E2, c1])
l1: {Polygon[A, B, D, C]}
G2 = Mirror(E2 + B2, F2)
A3: E2
B3: (G2 - A3) / abs(G2 - A3)
C3 = Ray(A3, Vector[B3])
D3: RemoveUndefined[{Intersect[c1, C3], Intersect[c2, C3], Intersect[c3, C3], Intersect[c4, C3]}] \ {A3}
E3 = If(D3(1) ≟ A3, D3(2), D3(1))
F3 = If(E3 ∈ c2, Line[A, B], E3 ∈ c4, Line[C, D], E3 ∈ c3, Tangent[E3, c3], Tangent[E3, c1])
G3 = Mirror(E3 + B3, F3)
A4: E3
B4: (G3 - A4) / abs(G3 - A4)
C4 = Ray(A4, Vector[B4])
D4: RemoveUndefined[{Intersect[c1, C4], Intersect[c2, C4], Intersect[c3, C4], Intersect[c4, C4]}] \ {A4}
E4 = If(D4(1) ≟ A4, D4(2), D4(1))
F4 = If(E4 ∈ c2, Line[A, B], E4 ∈ c4, Line[C, D], E4 ∈ c3, Tangent[E4, c3], Tangent[E4, c1])
G4 = Mirror(E4 + B4, F4)
A5: E4
B5: (G4 - A5) / abs(G4 - A5)
C5 = Ray(A5, Vector[B5])
D5: RemoveUndefined[{Intersect[c1, C5], Intersect[c2, C5], Intersect[c3, C5], Intersect[c4, C5]}] \ {A5}
E5 = If(D5(1) ≟ A5, D5(2), D5(1))
F5 = If(E5 ∈ c2, Line[A, B], E5 ∈ c4, Line[C, D], E5 ∈ c3, Tangent[E5, c3], Tangent[E5, c1])
G5 = Mirror(E5 + B5, F5)
A6: E5
B6: (G5 - A6) / abs(G5 - A6)
C6 = Ray(A6, Vector[B6])
D6: RemoveUndefined[{Intersect[c1, C6], Intersect[c2, C6], Intersect[c3, C6], Intersect[c4, C6]}] \ {A6}
E6 = If(D6(1) ≟ A6, D6(2), D6(1))
F6 = If(E6 ∈ c2, Line[A, B], E6 ∈ c4, Line[C, D], E6 ∈ c3, Tangent[E6, c3], Tangent[E6, c1])
G6 = Mirror(E6 + B6, F6)
A7: E6
B7: (G6 - A7) / abs(G6 - A7)
C7 = Ray(A7, Vector[B7])
D7: RemoveUndefined[{Intersect[c1, C7], Intersect[c2, C7], Intersect[c3, C7], Intersect[c4, C7]}] \ {A7}
E7 = If(D7(1) ≟ A7, D7(2), D7(1))
F7 = If(E7 ∈ c2, Line[A, B], E7 ∈ c4, Line[C, D], E7 ∈ c3, Tangent[E7, c3], Tangent[E7, c1])
G7 = Mirror(E7 + B7, F7)
A8: E7
B8: (G7 - A8) / abs(G7 - A8)
C8 = Ray(A8, Vector[B8])
D8: RemoveUndefined[{Intersect[c1, C8], Intersect[c2, C8], Intersect[c3, C8], Intersect[c4, C8]}] \ {A8}
E8 = If(D8(1) ≟ A8, D8(2), D8(1))
F8 = If(E8 ∈ c2, Line[A, B], E8 ∈ c4, Line[C, D], E8 ∈ c3, Tangent[E8, c3], Tangent[E8, c1])
G8 = Mirror(E8 + B8, F8)
A9: E8
B9: (G8 - A9) / abs(G8 - A9)
C9 = Ray(A9, Vector[B9])
D9: RemoveUndefined[{Intersect[c1, C9], Intersect[c2, C9], Intersect[c3, C9], Intersect[c4, C9]}] \ {A9}
E9 = If(D9(1) ≟ A9, D9(2), D9(1))
F9 = If(E9 ∈ c2, Line[A, B], E9 ∈ c4, Line[C, D], E9 ∈ c3, Tangent[E9, c3], Tangent[E9, c1])
G9 = Mirror(E9 + B9, F9)
A10: E9
B10: (G9 - A10) / abs(G9 - A10)
C10 = Ray(A10, Vector[B10])
D10: RemoveUndefined[{Intersect[c1, C10], Intersect[c2, C10], Intersect[c3, C10], Intersect[c4, C10]}] \ {A10}
E10 = If(D10(1) ≟ A10, D10(2), D10(1))
F10 = If(E10 ∈ c2, Line[A, B], E10 ∈ c4, Line[C, D], E10 ∈ c3, Tangent[E10, c3], Tangent[E10, c1])
G10 = Mirror(E10 + B10, F10)
A11: E10
B11: (G10 - A11) / abs(G10 - A11)
C11 = Ray(A11, Vector[B11])
D11: RemoveUndefined[{Intersect[c1, C11], Intersect[c2, C11], Intersect[c3, C11], Intersect[c4, C11]}] \ {A11}
E11 = If(D11(1) ≟ A11, D11(2), D11(1))
F11 = If(E11 ∈ c2, Line[A, B], E11 ∈ c4, Line[C, D], E11 ∈ c3, Tangent[E11, c3], Tangent[E11, c1])
G11 = Mirror(E11 + B11, F11)
A12: E11
B12: (G11 - A12) / abs(G11 - A12)
C12 = Ray(A12, Vector[B12])
D12: RemoveUndefined[{Intersect[c1, C12], Intersect[c2, C12], Intersect[c3, C12], Intersect[c4, C12]}] \ {A12}
E12 = If(D12(1) ≟ A12, D12(2), D12(1))
F12 = If(E12 ∈ c2, Line[A, B], E12 ∈ c4, Line[C, D], E12 ∈ c3, Tangent[E12, c3], Tangent[E12, c1])
G12 = Mirror(E12 + B12, F12)
A13: E12
B13: (G12 - A13) / abs(G12 - A13)
C13 = Ray(A13, Vector[B13])
D13: RemoveUndefined[{Intersect[c1, C13], Intersect[c2, C13], Intersect[c3, C13], Intersect[c4, C13]}] \ {A13}
E13 = If(D13(1) ≟ A13, D13(2), D13(1))
F13 = If(E13 ∈ c2, Line[A, B], E13 ∈ c4, Line[C, D], E13 ∈ c3, Tangent[E13, c3], Tangent[E13, c1])
G13 = Mirror(E13 + B13, F13)
A14: E13
B14: (G13 - A14) / abs(G13 - A14)
C14 = Ray(A14, Vector[B14])
D14: RemoveUndefined[{Intersect[c1, C14], Intersect[c2, C14], Intersect[c3, C14], Intersect[c4, C14]}] \ {A14}
E14 = If(D14(1) ≟ A14, D14(2), D14(1))
F14 = If(E14 ∈ c2, Line[A, B], E14 ∈ c4, Line[C, D], E14 ∈ c3, Tangent[E14, c3], Tangent[E14, c1])
G14 = Mirror(E14 + B14, F14)
A15: E14
B15: (G14 - A15) / abs(G14 - A15)
C15 = Ray(A15, Vector[B15])
D15: RemoveUndefined[{Intersect[c1, C15], Intersect[c2, C15], Intersect[c3, C15], Intersect[c4, C15]}] \ {A15}
E15 = If(D15(1) ≟ A15, D15(2), D15(1))
F15 = If(E15 ∈ c2, Line[A, B], E15 ∈ c4, Line[C, D], E15 ∈ c3, Tangent[E15, c3], Tangent[E15, c1])
G15 = Mirror(E15 + B15, F15)
A16: E15
B16: (G15 - A16) / abs(G15 - A16)
C16 = Ray(A16, Vector[B16])
D16: RemoveUndefined[{Intersect[c1, C16], Intersect[c2, C16], Intersect[c3, C16], Intersect[c4, C16]}] \ {A16}
E16 = If(D16(1) ≟ A16, D16(2), D16(1))
F16 = If(E16 ∈ c2, Line[A, B], E16 ∈ c4, Line[C, D], E16 ∈ c3, Tangent[E16, c3], Tangent[E16, c1])
G16 = Mirror(E16 + B16, F16)
A17: E16
B17: (G16 - A17) / abs(G16 - A17)
C17 = Ray(A17, Vector[B17])
D17: RemoveUndefined[{Intersect[c1, C17], Intersect[c2, C17], Intersect[c3, C17], Intersect[c4, C17]}] \ {A17}
E17 = If(D17(1) ≟ A17, D17(2), D17(1))
F17 = If(E17 ∈ c2, Line[A, B], E17 ∈ c4, Line[C, D], E17 ∈ c3, Tangent[E17, c3], Tangent[E17, c1])
G17 = Mirror(E17 + B17, F17)
A18: E17
B18: (G17 - A18) / abs(G17 - A18)
C18 = Ray(A18, Vector[B18])
D18: RemoveUndefined[{Intersect[c1, C18], Intersect[c2, C18], Intersect[c3, C18], Intersect[c4, C18]}] \ {A18}
E18 = If(D18(1) ≟ A18, D18(2), D18(1))
F18 = If(E18 ∈ c2, Line[A, B], E18 ∈ c4, Line[C, D], E18 ∈ c3, Tangent[E18, c3], Tangent[E18, c1])
G18 = Mirror(E18 + B18, F18)
A19: E18
B19: (G18 - A19) / abs(G18 - A19)
C19 = Ray(A19, Vector[B19])
D19: RemoveUndefined[{Intersect[c1, C19], Intersect[c2, C19], Intersect[c3, C19], Intersect[c4, C19]}] \ {A19}
E19 = If(D19(1) ≟ A19, D19(2), D19(1))
F19 = If(E19 ∈ c2, Line[A, B], E19 ∈ c4, Line[C, D], E19 ∈ c3, Tangent[E19, c3], Tangent[E19, c1])
G19 = Mirror(E19 + B19, F19)
A20: E19
B20: (G19 - A20) / abs(G19 - A20)
C20 = Ray(A20, Vector[B20])
D20: RemoveUndefined[{Intersect[c1, C20], Intersect[c2, C20], Intersect[c3, C20], Intersect[c4, C20]}] \ {A20}
E20 = If(D20(1) ≟ A20, D20(2), D20(1))
F20 = If(E20 ∈ c2, Line[A, B], E20 ∈ c4, Line[C, D], E20 ∈ c3, Tangent[E20, c3], Tangent[E20, c1])
G20 = Mirror(E20 + B20, F20)
A21: E20
B21: (G20 - A21) / abs(G20 - A21)
C21 = Ray(A21, Vector[B21])
D21: RemoveUndefined[{Intersect[c1, C21], Intersect[c2, C21], Intersect[c3, C21], Intersect[c4, C21]}] \ {A21}
E21 = If(D21(1) ≟ A21, D21(2), D21(1))
F21 = If(E21 ∈ c2, Line[A, B], E21 ∈ c4, Line[C, D], E21 ∈ c3, Tangent[E21, c3], Tangent[E21, c1])
G21 = Mirror(E21 + B21, F21)
A22: E21
B22: (G21 - A22) / abs(G21 - A22)
C22 = Ray(A22, Vector[B22])
D22: RemoveUndefined[{Intersect[c1, C22], Intersect[c2, C22], Intersect[c3, C22], Intersect[c4, C22]}] \ {A22}
E22 = If(D22(1) ≟ A22, D22(2), D22(1))
F22 = If(E22 ∈ c2, Line[A, B], E22 ∈ c4, Line[C, D], E22 ∈ c3, Tangent[E22, c3], Tangent[E22, c1])
G22 = Mirror(E22 + B22, F22)
A23: E22
B23: (G22 - A23) / abs(G22 - A23)
C23 = Ray(A23, Vector[B23])
D23: RemoveUndefined[{Intersect[c1, C23], Intersect[c2, C23], Intersect[c3, C23], Intersect[c4, C23]}] \ {A23}
E23 = If(D23(1) ≟ A23, D23(2), D23(1))
F23 = If(E23 ∈ c2, Line[A, B], E23 ∈ c4, Line[C, D], E23 ∈ c3, Tangent[E23, c3], Tangent[E23, c1])
G23 = Mirror(E23 + B23, F23)
A24: E23
B24: (G23 - A24) / abs(G23 - A24)
C24 = Ray(A24, Vector[B24])
D24: RemoveUndefined[{Intersect[c1, C24], Intersect[c2, C24], Intersect[c3, C24], Intersect[c4, C24]}] \ {A24}
E24 = If(D24(1) ≟ A24, D24(2), D24(1))
F24 = If(E24 ∈ c2, Line[A, B], E24 ∈ c4, Line[C, D], E24 ∈ c3, Tangent[E24, c3], Tangent[E24, c1])
G24 = Mirror(E24 + B24, F24)
A25: E24
B25: (G24 - A25) / abs(G24 - A25)
C25 = Ray(A25, Vector[B25])
D25: RemoveUndefined[{Intersect[c1, C25], Intersect[c2, C25], Intersect[c3, C25], Intersect[c4, C25]}] \ {A25}
E25 = If(D25(1) ≟ A25, D25(2), D25(1))
F25 = If(E25 ∈ c2, Line[A, B], E25 ∈ c4, Line[C, D], E25 ∈ c3, Tangent[E25, c3], Tangent[E25, c1])
G25 = Mirror(E25 + B25, F25)
A26: E25
B26: (G25 - A26) / abs(G25 - A26)
C26 = Ray(A26, Vector[B26])
D26: RemoveUndefined[{Intersect[c1, C26], Intersect[c2, C26], Intersect[c3, C26], Intersect[c4, C26]}] \ {A26}
E26 = If(D26(1) ≟ A26, D26(2), D26(1))
F26 = If(E26 ∈ c2, Line[A, B], E26 ∈ c4, Line[C, D], E26 ∈ c3, Tangent[E26, c3], Tangent[E26, c1])
G26 = Mirror(E26 + B26, F26)
A27: E26
B27: (G26 - A27) / abs(G26 - A27)
C27 = Ray(A27, Vector[B27])
D27: RemoveUndefined[{Intersect[c1, C27], Intersect[c2, C27], Intersect[c3, C27], Intersect[c4, C27]}] \ {A27}
E27 = If(D27(1) ≟ A27, D27(2), D27(1))
F27 = If(E27 ∈ c2, Line[A, B], E27 ∈ c4, Line[C, D], E27 ∈ c3, Tangent[E27, c3], Tangent[E27, c1])
G27 = Mirror(E27 + B27, F27)
A28: E27
B28: (G27 - A28) / abs(G27 - A28)
C28 = Ray(A28, Vector[B28])
D28: RemoveUndefined[{Intersect[c1, C28], Intersect[c2, C28], Intersect[c3, C28], Intersect[c4, C28]}] \ {A28}
E28 = If(D28(1) ≟ A28, D28(2), D28(1))
F28 = If(E28 ∈ c2, Line[A, B], E28 ∈ c4, Line[C, D], E28 ∈ c3, Tangent[E28, c3], Tangent[E28, c1])
G28 = Mirror(E28 + B28, F28)
A29: E28
B29: (G28 - A29) / abs(G28 - A29)
C29 = Ray(A29, Vector[B29])
D29: RemoveUndefined[{Intersect[c1, C29], Intersect[c2, C29], Intersect[c3, C29], Intersect[c4, C29]}] \ {A29}
E29 = If(D29(1) ≟ A29, D29(2), D29(1))
F29 = If(E29 ∈ c2, Line[A, B], E29 ∈ c4, Line[C, D], E29 ∈ c3, Tangent[E29, c3], Tangent[E29, c1])
G29 = Mirror(E29 + B29, F29)
A30: E29
B30: (G29 - A30) / abs(G29 - A30)
C30 = Ray(A30, Vector[B30])
D30: RemoveUndefined[{Intersect[c1, C30], Intersect[c2, C30], Intersect[c3, C30], Intersect[c4, C30]}] \ {A30}
E30 = If(D30(1) ≟ A30, D30(2), D30(1))
F30 = If(E30 ∈ c2, Line[A, B], E30 ∈ c4, Line[C, D], E30 ∈ c3, Tangent[E30, c3], Tangent[E30, c1])
G30 = Mirror(E30 + B30, F30)
A31: E30
B31: (G30 - A31) / abs(G30 - A31)
C31 = Ray(A31, Vector[B31])
D31: RemoveUndefined[{Intersect[c1, C31], Intersect[c2, C31], Intersect[c3, C31], Intersect[c4, C31]}] \ {A31}
E31 = If(D31(1) ≟ A31, D31(2), D31(1))
F31 = If(E31 ∈ c2, Line[A, B], E31 ∈ c4, Line[C, D], E31 ∈ c3, Tangent[E31, c3], Tangent[E31, c1])
G31 = Mirror(E31 + B31, F31)
A32: E31
B32: (G31 - A32) / abs(G31 - A32)
C32 = Ray(A32, Vector[B32])
D32: RemoveUndefined[{Intersect[c1, C32], Intersect[c2, C32], Intersect[c3, C32], Intersect[c4, C32]}] \ {A32}
E32 = If(D32(1) ≟ A32, D32(2), D32(1))
F32 = If(E32 ∈ c2, Line[A, B], E32 ∈ c4, Line[C, D], E32 ∈ c3, Tangent[E32, c3], Tangent[E32, c1])
G32 = Mirror(E32 + B32, F32)
A33: E32
B33: (G32 - A33) / abs(G32 - A33)
C33 = Ray(A33, Vector[B33])
D33: RemoveUndefined[{Intersect[c1, C33], Intersect[c2, C33], Intersect[c3, C33], Intersect[c4, C33]}] \ {A33}
E33 = If(D33(1) ≟ A33, D33(2), D33(1))
F33 = If(E33 ∈ c2, Line[A, B], E33 ∈ c4, Line[C, D], E33 ∈ c3, Tangent[E33, c3], Tangent[E33, c1])
G33 = Mirror(E33 + B33, F33)
A34: E33
B34: (G33 - A34) / abs(G33 - A34)
C34 = Ray(A34, Vector[B34])
D34: RemoveUndefined[{Intersect[c1, C34], Intersect[c2, C34], Intersect[c3, C34], Intersect[c4, C34]}] \ {A34}
E34 = If(D34(1) ≟ A34, D34(2), D34(1))
F34 = If(E34 ∈ c2, Line[A, B], E34 ∈ c4, Line[C, D], E34 ∈ c3, Tangent[E34, c3], Tangent[E34, c1])
G34 = Mirror(E34 + B34, F34)
A35: E34
B35: (G34 - A35) / abs(G34 - A35)
C35 = Ray(A35, Vector[B35])
D35: RemoveUndefined[{Intersect[c1, C35], Intersect[c2, C35], Intersect[c3, C35], Intersect[c4, C35]}] \ {A35}
E35 = If(D35(1) ≟ A35, D35(2), D35(1))
F35 = If(E35 ∈ c2, Line[A, B], E35 ∈ c4, Line[C, D], E35 ∈ c3, Tangent[E35, c3], Tangent[E35, c1])
G35 = Mirror(E35 + B35, F35)
A36: E35
B36: (G35 - A36) / abs(G35 - A36)
C36 = Ray(A36, Vector[B36])
D36: RemoveUndefined[{Intersect[c1, C36], Intersect[c2, C36], Intersect[c3, C36], Intersect[c4, C36]}] \ {A36}
E36 = If(D36(1) ≟ A36, D36(2), D36(1))
F36 = If(E36 ∈ c2, Line[A, B], E36 ∈ c4, Line[C, D], E36 ∈ c3, Tangent[E36, c3], Tangent[E36, c1])
G36 = Mirror(E36 + B36, F36)
A37: E36
B37: (G36 - A37) / abs(G36 - A37)
C37 = Ray(A37, Vector[B37])
D37: RemoveUndefined[{Intersect[c1, C37], Intersect[c2, C37], Intersect[c3, C37], Intersect[c4, C37]}] \ {A37}
E37 = If(D37(1) ≟ A37, D37(2), D37(1))
F37 = If(E37 ∈ c2, Line[A, B], E37 ∈ c4, Line[C, D], E37 ∈ c3, Tangent[E37, c3], Tangent[E37, c1])
G37 = Mirror(E37 + B37, F37)
A38: E37
B38: (G37 - A38) / abs(G37 - A38)
C38 = Ray(A38, Vector[B38])
D38: RemoveUndefined[{Intersect[c1, C38], Intersect[c2, C38], Intersect[c3, C38], Intersect[c4, C38]}] \ {A38}
E38 = If(D38(1) ≟ A38, D38(2), D38(1))
F38 = If(E38 ∈ c2, Line[A, B], E38 ∈ c4, Line[C, D], E38 ∈ c3, Tangent[E38, c3], Tangent[E38, c1])
G38 = Mirror(E38 + B38, F38)
A39: E38
B39: (G38 - A39) / abs(G38 - A39)
C39 = Ray(A39, Vector[B39])
D39: RemoveUndefined[{Intersect[c1, C39], Intersect[c2, C39], Intersect[c3, C39], Intersect[c4, C39]}] \ {A39}
E39 = If(D39(1) ≟ A39, D39(2), D39(1))
F39 = If(E39 ∈ c2, Line[A, B], E39 ∈ c4, Line[C, D], E39 ∈ c3, Tangent[E39, c3], Tangent[E39, c1])
G39 = Mirror(E39 + B39, F39)
A40: E39
B40: (G39 - A40) / abs(G39 - A40)
C40 = Ray(A40, Vector[B40])
D40: RemoveUndefined[{Intersect[c1, C40], Intersect[c2, C40], Intersect[c3, C40], Intersect[c4, C40]}] \ {A40}
E40 = If(D40(1) ≟ A40, D40(2), D40(1))
F40 = If(E40 ∈ c2, Line[A, B], E40 ∈ c4, Line[C, D], E40 ∈ c3, Tangent[E40, c3], Tangent[E40, c1])
G40 = Mirror(E40 + B40, F40)
trayectoria = PolyLine(A1:A50)