         Datos Witelo
Incidencia    Refracción
      10°               7,75°
      20°               15,5°
      30°               22,5°
      40°               29°
      50°               35°
      60°               40,5°
      70°               45,5°
      80°               50°

n21 =

Datos Witelo

n21 = 1.33 (slider from CD / Distance[B, A] to 3, step 0.01)
B = Point(Ray[(0, 0), Vector[(-1, 0)]])
g = OrthogonalLine(B, xAxis)
A = Point(Ray[(0, 0), Vector[(0, 1)]])
f = Line(B, A)
c = Circle(B, A)
C = Intersect(c, f, 2)
h = OrthogonalLine(C, g)
D = Intersect(g, h)
d = Circle(D, Distance[C, D] / n21)
E = Intersect(d, h, 2)
i_1 = OrthogonalLine(E, h)
H, I = Intersect(c, xAxis)
e = Semicircle(I, H)
CD = Distance(C, D)
ED = Distance(E, D)
F = Intersect(e, i_1)
j = Segment(B, F)
k = Segment(C, A)
l = Segment(C, D)
m = Segment(D, B)
n = Segment(E, F)
p = Line(B, F)
R = Intersect(yAxis, p)
q = Segment(B, R)
R' = Mirror(R, xAxis)
r_1 = Segment(R', R)
lugar1 = Locus(F, B)
a = If(x(H) > -8, -9, x(H) - 1)
S: (a, 0)
G = Intersect(r_1, xAxis)
s = Segment(S, (y(A), 0))
t = Segment(E, C)
A' = Mirror(A, xAxis)
b = Segment(A', A)
Incidencia: 10°
Refracción: 7.75°
J = DatosWitelo(xAxis, yAxis, A, 10°, 7.75°)
K = DatosWitelo(xAxis, yAxis, A, 20°, 15.5°)
L = DatosWitelo(xAxis, yAxis, A, 30°, 22.5°)
M = DatosWitelo(xAxis, yAxis, A, 40°, 29°)
N = DatosWitelo(xAxis, yAxis, A, 50°, 35°)
O = DatosWitelo(xAxis, yAxis, A, 60°, 40.5°)
P = DatosWitelo(xAxis, yAxis, A, 70°, 45.5°)
Q = DatosWitelo(xAxis, yAxis, A, 80°, 50°)
CasillaDeEntrada1 = Textfield(n21)
o = false
T, U = Intersect(c, g)
i = Angle(A, B, U)
r = Angle(F, B, T)
texto2: "i = " + i + "
r = " + r + ""

Tool: Datos Witelo (command DatosWitelo)
DatosWitelo[ <EjeX>, <EjeY>, <A>, <Incidencia>, <Refracción> ]
Input: xAxis, yAxis, A, Incidencia, Refracción
Output: C'

G = Intersect(xAxis, yAxis)
Incidencia: 10°
Refracción: 7.75°
G' = Rotate(G, 360° - Incidencia, A)
f = Line(A, G')
B = Intersect(f, xAxis)
g = OrthogonalLine(B, xAxis)
c = Circle(B, A)
C = Intersect(c, g, 1)
C' = Rotate(C, 360° - Refracción, B)