Minimum deviation of angle in prism (simulation)

Clear["Global`*"];

A1={Cos[(π/2)-θi1], Sin[(π/2)-θi1]};O1={0,0};AM1=-0.4 A1;B11={Cos[θi1-θt1] Sec[α-θt1] Sin[α],-Sec[α-θt1] Sin[α] Sin[θi1-θt1]};D11={Cos[θi1] Tan[α-θt1],-Sin[θi1] Tan[α-θt1]};BD11=B11-D11;AD11=A1-D11;R1=(1/2)(Sqrt[AD11.AD11])//Simplify;CN1=(1/2) (A1+D11)//Simplify;F11={Csc[α-θi1-θi2] Sec[α-θt1] Sin[α] Sin[α-θi2-θt1],0};BC1=10{Cos[θi1+θi2-α],-Sin[θi1+θi2-α]};C1=B11+BC1//Simplify;rule1={θt1->ArcSin[(1/ng) Sin[θi1]]};rule2={θi2->ArcSin[ng Sin[θt2]]};rule3={ θt2->α-ArcSin[(1/ng) Sin[θi1]]};A11=A1/.rule2/.rule3/.rule1;AM11=AM1/.rule2/.rule3/.rule1;BC2=BC1/.rule2/.rule3/.rule1;C12=C1/.rule2/.rule3/.rule1;B12=B11/.rule2/.rule3/.rule1;D12=D11/.rule2/.rule3/.rule1;CN2=CN1/.rule2/.rule3/.rule1;BD12=BD11/.rule2/.rule3/.rule1;F12=F11/.rule2/.rule3/.rule1;R2=R1/.rule2/.rule3/.rule1;

f[θ_]:=Graphics[{Arrow[{{0,-10},{0,2}}],Arrow[{{-0.2,0},{10,0}}],Hue[((θi1-(π/6))/(π/6))], Thick, Line[{O1, A11}], Line[{A11, B12 +0.4 (B12 - A11)}],  Line[{O1,AM11}], Black, Thin,Line[{D12, B12}],Line[{B12,B12+0.6 BD12}],Line[{O1,D12}],Line[{-0.6 D12,O1}],Line[{F12,B12}],Hue[((θi1-(π/6))/(π/6))], Thick,Arrow[{{-0.4,0},{0,0}}],Arrow[{O1,B12}],Arrow[{B12,C12}] ,Black, Thin, Circle[CN2, R2],PointSize[0.03],Hue[0], Point[C12]}]/.θi1->θ;

ng=1.5;α=60°;Manipulate[Show[f[θ], PlotRange->All, AspectRatio->Automatic],{θ, (π/6), ((1.4 π)/3)}]