FRESDEMO Fresnel Reflection and Transmission Demo

Requires: FRESNEL
Computes Fresnel reflection coefficients for a number of situations.
by Chuck DiMarzio
   Northeastern University
   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.

Contents

Looking at Bresters Angle for Air-Medium

nlist=1:.1:4;
brewster=atan(nlist)*180/pi;
brewsteri=atan(1./nlist)*180/pi;
critical=asin(1./nlist)*180/pi;
moose=1:10:length(nlist);
fig1 = figure(1);
plot(nlist(moose),brewster(moose),'x',...
     nlist(moose),brewsteri(moose),'+',...
     nlist(moose),critical(moose),'o',...
     nlist,brewster,'b-',...
     nlist,brewsteri,'g-',...
     nlist,critical,'r-');grid on;
xlabel('n, Index of Refraction');
ylabel('Angle, Degrees');
legend('Brewster, Air-Medium',...
       'Brewster, Medium-Air',...
       'Critical,Medium-Air','Location','North');

Air to Glass Reflections

thetad=0:.1:90;
n=1.5;
[ras,rap,tas,tap]=fresnel(thetad,n);
moose=1:200:length(thetad);
fig2 = figure(2);
plot(thetad(moose),ras(moose),'x',...
     thetad(moose),tas(moose),'+',...
     thetad(moose),rap(moose),'o',...
     thetad(moose),tap(moose),'v',...
     thetad,ras,'-',...
     thetad,tas,'-',...
     thetad,rap,'-',...
     thetad,tap,'-',...
     [0,100],[0,0],'k');grid on;
xlabel('\theta, Angle, deg.');
ylabel('\tau or \rho');
title('Air to Glass')
legend('\rho_s','\tau_s','\rho_p','\tau_p');

Air to Water Reflections

n=1.33;
[ras,rap,tas,tap]=fresnel(thetad,n);
RIS=abs(ras).^2;
RIP=abs(rap).^2;
RS=10*log10(RIS);
TS=10*log10(1-RIS);
RP=10*log10(RIP);
TP=10*log10(1-RIP);
moose=1:200:length(thetad);
fig3 = figure(3);
plot(thetad(moose),RS(moose),'x',...
     thetad(moose),TS(moose),'+',...
     thetad(moose),RP(moose),'o',...
     thetad(moose),TP(moose),'v',...
     thetad,RS,'-',...
     thetad,TS,'-',...
     thetad,RP,'-',...
     thetad,TP,'-');grid on;
axis([0,90,-20,0]);
xlabel('\theta, Angle, deg.');
ylabel('T or R');
title('Air to Water')
legend('R_s','T_s','R_p','T_p','Location','NorthWest');

Air to Glass Interface

n=1.5;
[ras,rap,tas,tap]=fresnel(thetad,n);
RIS=abs(ras).^2;
RIP=abs(rap).^2;
RS=10*log10(RIS);
TS=10*log10(1-RIS);
RP=10*log10(RIP);
TP=10*log10(1-RIP);
moose=1:200:length(thetad);
fig4 = figure(4);
plot(thetad(moose),RS(moose),'x',...
     thetad(moose),TS(moose),'+',...
     thetad(moose),RP(moose),'o',...
     thetad(moose),TP(moose),'v',...
     thetad,RS,'-',...
     thetad,TS,'-',...
     thetad,RP,'-',...
     thetad,TP,'-');grid on;
axis([0,90,-20,0]);
xlabel('\theta, Angle, deg.');
ylabel('T or R');
title('Air to Glass')
legend('R_s','T_s','R_p','T_p','Location','NorthWest');

Air to Germanium Interface

n=4;
[ras,rap,tas,tap]=fresnel(thetad,n);
%  tas and tap are used for field transmission.
RIS=abs(ras).^2;
RIP=abs(rap).^2;
RS=10*log10(RIS);
TS=10*log10(1-RIS);
RP=10*log10(RIP);
TP=10*log10(1-RIP);
moose=1:200:length(thetad);
fig5 = figure(5);
plot(thetad(moose),RS(moose),'x',...
     thetad(moose),TS(moose),'+',...
     thetad(moose),RP(moose),'o',...
     thetad(moose),TP(moose),'v',...
     thetad,RS,'-',...
     thetad,TS,'-',...
     thetad,RP,'-',...
     thetad,TP,'-');grid on;
axis([0,90,-20,0]);
xlabel('\theta, Angle, deg.');
ylabel('T or R');
title('Air to Germanium')
legend('R_s','T_s','R_p','T_p','Location','SouthWest');

Glass to Air Interface

n=1/1.5;
[ras,rap,tas,tap]=fresnel(thetad,n);
%  tas and tap are used for field transmission.
RIS=abs(ras).^2;
RIP=abs(rap).^2;
RS=10*log10(RIS);
TS=10*log10(1-RIS);
RP=10*log10(RIP);
TP=10*log10(1-RIP);
moose=1:200:length(thetad);
fig6 = figure(6);
plot(thetad(moose),RS(moose),'x',...
     thetad(moose),real(TS(moose)),'+',...
     thetad(moose),RP(moose),'o',...
     thetad(moose),real(TP(moose)),'v',...
     thetad,RS,'-',...
     thetad,real(TS),'-',...
     thetad,RP,'-',...
     thetad,real(TP),'-');grid on;
axis([0,90,-20,0]);
xlabel('\theta, Angle, deg.');
ylabel('T or R');
title('Glass to Air')
legend('R_s','T_s','R_p','T_p','Location','SouthEast');

Glass to Air

prs=angle(ras)*180/pi;
pts=angle(tas)*180/pi;
prp=angle(rap)*180/pi;
ptp=angle(tap)*180/pi;
fig7 = figure(7);
plot(thetad(moose),prs(moose),'x',...
     thetad(moose),pts(moose),'+',...
     thetad(moose),prp(moose),'o',...
     thetad(moose),ptp(moose),'v',...
     thetad,prs,'-',...
     thetad,pts,'-',...
     thetad,prp,'-',...
     thetad,ptp,'-');grid on;
axis([0,90,-180,0]);
xlabel('\theta, Angle, deg.');
ylabel('\phi, Phase, deg');
title('Glass to Air')
legend('R_s','T_s','R_p','T_p','Location','SouthWest');
%print('-depsc',[epspath,'6-11-glassairp.eps']);

Glass to Air

dphase=angle(ras./rap)*180/pi;
fig8 = figure(8);
plot(thetad,dphase,'-');grid on;
axis([0,90,0,60]);
xlabel('\theta, Angle, deg.');
ylabel('\phi_{rs}-\phi_{rp}, Phase, deg.');
title('Glass to Air')

Air to Metal

n=4+3i;
[ras,rap,tas,tap]=fresnel(thetad,n);
%  tas and tap are used for field transmission.
RIS=abs(ras).^2;
RIP=abs(rap).^2;
moose=1:200:length(thetad);
fig9 = figure(9);
plot(thetad(moose),RIS(moose),'x',...
     thetad(moose),RIP(moose),'o',...
     thetad,RIS,'-',...
     thetad,RIP,'--');grid on;
xlabel('\theta, Angle, deg.');
ylabel('T or R');
title('Air to Metal')
legend('R_s','R_p','Location','SouthWest');

Air to Metal

prs=unwrap(angle(ras))*180/pi+360;
prp=unwrap(angle(rap))*180/pi;
fig10 = figure(10);
plot(thetad(moose),prs(moose),'x',...
     thetad(moose),prp(moose),'o',...
     thetad,prs,'-',...
     thetad,prp,'--',...
     [0,100],[180,180],'k-');grid on;
xlabel('\theta, Angle, deg.');
ylabel('\phi, Phase, deg');
title('Air to Metal')
legend('R_s','R_p','Location','SouthEast');