Déviation d'un rayon lumineux par une lame à faces parallèles

Régler 
- l'épaisseur de la lame 
- l'indice de la lame
- l'angle du rayon incident 
  en déplaçant le point A

!!!  Pour un bon fonctionnement de l'animation, le point A doit rester au-dessus de la lame  !!!

e = 3.2 (slider from 1 to 5, step 0.1)
Z_1: (-1.0 * 1.0 * 1.0 * 1.0 * 1.0 * 1.0 * 1.0 * 1.0 * 1.0 * 1.0 * 1.0 * 1.0 * 1.0 * 7.0, e)
a = OrthogonalLine(Z_1, yAxis)
B = Point(a)
q = Circle(B, 4.0)
z_5 = Intersect(xAxis, yAxis)
z_3: (15.0, e)
z_2 = (-7, 0)
z_4 = (15, 0)
poly1, c, d, b, e_1 = Polygon(Z_1, z_3, z_4, z_2)
f = OrthogonalLine(B, a)
A = Point(q)
i = Segment(A, B)
n = 1.53 (slider from 1 to 2, step 0.01)
E = Point(i)
u = Vector(A, E)
O = (-1.3536018181818175, 7.115183636363633)
α: atan((x(B) - x(A)) / (y(B) - y(A)))
atan((y(B) - y(A)) / (x(B) - x(A))): atan((x(B) - x(A)) / (y(B) - y(A)))
β: asin(sin(α) / n)
g = OrthogonalLine(B, c)
h = Circle(B, e / 3.0)
C, D = Intersect(h, g)
C' = Rotate(C, -1.0 * β, B)
j = Ray(B, C')
F = Intersect(b, j)
k = OrthogonalLine(F, b)
p = Circle(F, e / 3.0)
G, H = Intersect(p, k)
H' = Rotate(H, -1.0 * α, F)
l = Ray(F, H')
γ = Angle(A, B, D)
δ = Angle(C', B, C)
ε = Angle(C', F, G)
ζ = Angle(H', F, H)
m = If(α > 0.0, 1.0, 0.0)
η = Angle(D, B, A)
θ = Angle(C, B, C')
ι = Angle(G, F, C')
κ = Angle(H, F, H')
r = Segment(B, F)
s = Segment(D, C)
t = Segment(G, H)
texte4: "indice : " + n
I = Point(i)
K = Point(l)
a_1 = Line(A, I)
b_1 = OrthogonalLine(K, l)
J = Intersect(a_1, b_1)
distanceKJ = Distance(K, J)
TexteKJ: Name[K] + (Name[J]) + " \, = \, " + distanceKJ