Plots that demonstrate the angle for total internal reflection (from Snell’s law).

ClearAll[thetaT]

thetaT[i_, ni_, nt_] = ArcSin[ Sin[i] ni/nt ] ;
p[ n1_, n2_] := Plot[ thetaT[i, n1, n2], {i, 0, Pi/2}, AxesLabel->{"(Subscript[θ, i])", Row[{"(Subscript[θ, t]), (Subscript[n, 1])/(Subscript[n, 2]) = ", n1/n2}]}, Ticks -> {{0, Pi/8, Pi/4, Pi/2}, {0, Pi/8, Pi/4, Pi/2}} 
] ;

Manipulate[ 
p[n1, n2]
,{{n1, 1, "(Subscript[n, 1])"}, 1, 10},{{n2, 1, "(Subscript[n, 2])"}, 1, 10}]

<<peeters` ;

peeters`setGitDir[ "figures\\ece1228-emt" ]

peeters`exportForLatex["reflectionForN2gtN1Fig1", p1]
peeters`exportForLatex["reflectionForN1gtN2TotalInternalReflectionFig2", p2]

(*p1 = p[ 1, 2] 
p2 = p[2, 1]*)
p3 = Plot[ {thetaT[i, 1,2],thetaT[i, 2,1]}, {i, 0, Pi/2}, AxesLabel->{"(Subscript[θ, i])", "(Subscript[θ, t])"}, Ticks -> {{0, Pi/8, Pi/4, Pi/2}, {0, Pi/8, Pi/4, Pi/2}} ,
PlotLegends->Placed[ {"(Subscript[n, i])/(Subscript[n, t]) = 1/2", "(Subscript[n, i])/(Subscript[n, t]) = 2"}, {Right, Top}], PlotRange -> Full 
] 
peeters`exportForLatex["reflectionForBothFig3", p3]