Refraction through Parallel Faces

Manipulate[Graphics[{LightBlue,Rectangle[{0,0},{4,1}],Arrowheads[.03],Red,Arrow[{{-Sin[θ],Cos[θ]}+{1.5,1},{1.5,1}}],Blue,Arrow@Table[.5{-Sin[x],Cos[x]}+{1.5,1},{x,0,θ,.05}],Dashed,Red,Line[{1.5{Sin[θ],-Cos[θ]}+{1.5,1},{1.5,1}}],Dashing[1],Black,Line[{{1.5,2},{1.5,.25}}],With[{θ2=ArcSin[(1/1.5)Sin[θ]]},{Red,Arrow[{{1.5,1},{1.5,1}+{Tan[θ2],-1}}],Blue,Arrow@Table[.5{-Sin[x],Cos[x]}+{1.5,1}+{Tan[θ2],-1},{x,0,θ2,.05}],Arrow@Table[.5{Sin[x],2-Cos[x]}+{1.5,0},{x,0,θ2,.05}],Dashed,Red,Line[{{1.5,1}+{Tan[θ2],-1},{1.5,1}+{Tan[θ2],-1}+1.5{Sin[θ2],-Cos[θ2]}}],Dashing[1],Black,Line[{{Tan[θ2]+1.5,-1},{Tan[θ2]+1.5,.75}}],With[{θ3=ArcSin[(1.5/1)Sin[θ2]]},{Blue,Arrow@Table[.5{Sin[x],-Cos[x]}+{1.5,0}+{Tan[θ2],0},{x,0,θ3,.05}],Red,Arrow[{{1.5,1}+{Tan[θ2],-1},{1.5+Tan[θ2],0}+{Sin[θ3],-Cos[θ3]}}]}]}]},Background->LightYellow,ImageSize->{500,400},PlotRange->{{0,4},{-1,2}}],
{{θ,1},0,π/2}]

CAPTION

A ray of light passes through the air (yellow) to a glass plate (blue) and then back into the air. By Snell's law, the angles of refraction at the first and second surfaces are equal and therefore the entry and exit rays are parallel.

THIS NOTEBOOK IS THE SOURCE CODE FROM

"Refraction through Parallel Faces" from the Wolfram Demonstrations Project
 http://demonstrations.wolfram.com/RefractionThroughParallelFaces/

Contributed by: Enrique Zeleny

A full-function Wolfram Mathematica system (Version 6 or higher) is required to edit this notebook.
GET WOLFRAM MATHEMATICA »

© Wolfram Demonstrations Project & Contributors   |   Terms of Use   |   Make a new version of this Demonstration »