n21 =

A = Intersect(xAxis, yAxis)
ControlCircunferencia = Point(Ray[(0.5, 0), Vector[(1, 0)]])
c = Circle(A, ControlCircunferencia)
B = Intersect(c, xAxis, 2)
f = OrthogonalLine(B, xAxis)
ControlRayo: (x(B), (-2 / 3 * Distance[A, ControlCircunferencia]))
d = Circle(B, ControlRayo)
E = Intersect(d, xAxis, 1)
e = CircleArc(B, E, ControlRayo)
F = Point(e)
n21 = 1.33 (slider from 0 to 3, step 0.01)
CasillaDeEntrada1 = Textfield(n21)
i_1 = Angle(E, B, F)
g = Line(F, B)
α: asind((1 / n21 * sin(i_1)))
A' = Rotate(A, α, B)
h = Line(B, A')
r_1 = Angle(A, B, A')
C = Intersect(c, h, 2)
i_2 = Angle(B, C, A)
β: asind((n21 * sin(i_2)))
A'_2 = Rotate(A, 180° - i_1, C)
i = Line(C, A'_2)
k = Circle(A, (2 * Distance[A, ControlCircunferencia]))
H = Intersect(k, xAxis, 1)
j = Line(A, C)
I = Intersect(k, j, 2)
l = Segment(H, A)
m = Segment(A, I)
n = Segment(B, C)
r_2 = Angle(A'_2, C, I)
p = Circle(A, (2.5 * Distance[A, ControlCircunferencia]))
J = Intersect(p, g, 1)
K = Intersect(p, i, 2)
q = Segment(J, B)
r = Segment(C, K)
texto1: "i_1 = " + i_1 + "
r_1 = " + r_1 + "
i_2 = " + i_2 + "
r_2 = " + r_2 + " "