clear all;
%假设入射光偏振角度为45度
n1=1;
n2=1.5;
brewster=atan(n2/n1); %布儒斯特角,当空—板全偏振,板—空也全偏振
C=asin(n1/n2); %当平板内发生全反射时,theta2临界角
theta1C=asin(n2*sin(C)/n1); %theta2为临界角时theta1角度 (其实为90度)
theta1=0:0.01:theta1C ; %空气到平板的入射角,平板到空气的折射角
theta2=asin((n1/n2)*sin(theta1)); %空气到平板的折射角,平板到空气的入射角
alpha1pie=atan(-cos(theta1-theta2)./cos(theta1+theta2));%第一次反射后光的偏振角度
alpha21=atan(cos(theta1-theta2)); %第一次折射后的偏振角度
alpha21pie=atan(-cos(theta2-theta1)./cos(theta2+theta1).*tan(alpha21));%第二次反射后的偏振角度3
alpha22=atan(cos(theta2-theta1).*tan(alpha21pie)); %第二次折射后的偏振角度
plot(theta1,alpha1pie,'r')%平板上表面反射光的偏振角变化
xlabel('空气到平板入射角(弧度)'),ylabel('偏振角度(弧度)');
hold on;
plot(theta1,alpha22,'g') %平板上表面折射光的偏振角变化
hold off;
legend('平板上表面出射反射光的偏振角变化','平板上表面出射折射光的偏振角变化','Location','northwest');