Contents

SNELL Demonstration of Snell's Law

by Chuck DiMarzio
   Northeastern University
   December 2008
!! This file may be copied, used, or modified for educational and
!! research purposes provided that this header information is not
!! removed or altered, and provided that the book is cited in
!! publications, as DiMarzio, Charles A., Optics for Engineers,
!! CRC Press, Boca Raton, FL, 2011.
!! http://www.crcpress.com
!! Other distribution is prohibited without permission.
%set(0,'DefaultAxesColorOrder',[0 0 0]); % let other files handle this
%set(0,'DefaultAxesLineStyleOrder','-|--|-.|:');

Angle of incidence and refraction going from air to various materials

theta=(0:0.1:90); % Degrees
n=[1.33,1.5,2.4,4];  % Four indices of refraction, water, glass, zinc
                     % selenide and germanium
[tin,nn]=meshgrid(theta,n); % tin is theta_in angle of incidence in degrees
tout=asind(sind(tin)./nn);  % tout is theta_out.  Here we are going from
                            % air to the medium with index nn.
fig1=figure(1);plot(tin',tout');
xlabel('\theta, Incident Angle, Deg.');
ylabel('\theta, Refracted Angle, Deg.');
axis image;axis([0,90,0,90]);
legend('Water (1.33)','Glass (1.5)','ZnSe (2.4)','Ge (4.0)',...
       'Location','NorthWest');
grid on;

Angle of incidence and refraction going from the material to air

fig2=figure(2);plot(tout',tin'); % Just the opposite of the case above
xlabel('\theta, Incident Angle, Deg.');
ylabel('\theta, Refracted Angle, Deg.');
axis image;axis([0,90,0,90]);
grid on;
legend('Water (1.33)','Glass (1.5)','ZnSe (2.4)','Ge (4.0)',...
       'Location','SouthEast');

Small changes in refraction for different kinds of glass

n=[1.45,1.5,1.6,1.7];  % Four indices of refraction for different kinds of
                       % glass
[tin,nn]=meshgrid(theta,n);
tout=asind(sind(tin)./nn);
fig3=figure(3);plot(tin',tout');
xlabel('\theta, Incident Angle, Deg.');
ylabel('\theta, Refracted Angle, Deg.');
axis image;axis([0,90,0,90]);
legend(num2str(n','%1.2f'),...
       'Location','NorthWest');
grid on;