0001 global noCheckSum;
0002 noCheckSum=true;
0003
0004
0005
0006 nNmax=50;
0007
0008
0009 epsilonM=1.77;
0010
0011
0012
0013
0014 scrsz = get(0,'ScreenSize');
0015 figAspectRatio=1;
0016 figHeight=scrsz(4)-150;
0017 figWidth=figAspectRatio*figHeight;
0018 figure('Name','Fig. 6.9', ...
0019 'Position',[(scrsz(3)-figWidth)/2 50 figWidth figHeight]);
0020
0021 nNbTheta=31;
0022 theta=transpose(linspace(0,pi,nNbTheta));
0023 nNbPhi=nNbTheta;
0024 phi=linspace(-pi,pi,nNbPhi);
0025
0026 xs=sin(theta) * cos(phi);
0027 ys=sin(theta) * sin(phi);
0028 zs=repmat(cos(theta),1,nNbPhi);
0029
0030
0031 aArray=[10,50];
0032
0033 lambdaArray=[392, 492];
0034
0035 sTitle={'Silver sphere in water - a=10 nm - \lambda=392 nm', ...
0036 'Silver sphere in water - a=50nm - \lambda=492 nm'};
0037
0038
0039 for nn=1:2
0040 lambda=lambdaArray(nn);
0041
0042
0043 epsilonIn=epsAg(lambda);
0044
0045
0046 a=aArray(nn);
0047
0048
0049 stM=PweSolveSingleSphere(nNmax,a,lambda,epsilonM,epsilonIn,'noplot','coeff');
0050
0051
0052
0053 stEsurf=PweEsurf(lambda,epsilonM,stM,a,nNbTheta,'Outside');
0054
0055
0056 Ecr2=transpose(abs(stEsurf.Ecr).^2);
0057 Ec2=Ecr2+transpose(abs(stEsurf.Ect).^2);
0058 Es2=transpose(abs(stEsurf.Esf).^2);
0059
0060
0061
0062 MLoc=Ec2 * (cos(phi).^2) + Es2 * (sin(phi).^2);
0063 MLocPerp=Ecr2 * (cos(phi).^2);
0064
0065
0066
0067 hpl1=subplot(2,2,2*nn-1);
0068 set(hpl1,'Outerposition',[0,0.5*(2-nn),0.5,0.5]);
0069
0070 surf(xs,ys,zs,log10(MLoc));
0071 axis tight; axis equal; axis off;
0072 colormap gray; colorbar('eastOutside','fontsize',8);
0073 set(hpl1,'CameraViewAngle',8.5);
0074 hold on;
0075 line([-1.6;1.6], [0;0],[0;0],'LineStyle','--','Color','k');
0076 line([0;0],[-1.8;1.8], [0;0],'LineStyle','--','Color','k');
0077 line([0;0],[0;0],[-1.4;1.4], 'LineStyle','--','Color','k');
0078 quiver3(-1.7,0,0,0.5,0,0,'k');
0079 text(-1.55,-0.1,-0.07,'\bf E_0');
0080 quiver3(-1.7,0,0,0,0,0.5,'k');
0081 text(-1.9,0,0.3,'\bf k');
0082 text(-0.9,0,1.85,'\bf log_{10}( M_{Loc}=|E_{Loc}|^2/|E_{Inc}|^2 )');
0083 ht=title(sTitle{nn});
0084 set(ht,'Position',get(ht,'Position')+[1.4 -1.1 0]);
0085 hold off;
0086
0087 hpl2=subplot(2,2,2*nn);
0088 set(hpl2,'Outerposition',[0.5,0.5*(2-nn),0.5,0.5])
0089
0090 surf(xs,ys,zs,MLocPerp./MLoc);
0091 axis tight; axis equal;axis off;
0092 colormap gray; colorbar('eastOutside','fontsize',8);
0093 set(hpl2,'CameraViewAngle',8.5);
0094 hold on;
0095 line([-1.6;1.6], [0;0],[0;0],'LineStyle','--','Color','k');
0096 line([0;0],[-1.8;1.8], [0;0],'LineStyle','--','Color','k');
0097 line([0;0],[0;0],[-1.4;1.4], 'LineStyle','--','Color','k');
0098 quiver3(-1.7,0,0,0.5,0,0,'k');
0099 text(-1.55,-0.1,-0.07,'\bf E_0');
0100 quiver3(-1.7,0,0,0,0,0.5,'k');
0101 text(-1.9,0,0.3,'\bf k');
0102 text(-0.6,0,1.85,'\bf |E^{Perp}_{Loc}|^2/|E_{Loc}|^2');
0103 hold off;
0104 end