光强分布MATLAB
- 格式:doc
- 大小:687.50 KB
- 文档页数:10
一、高斯光束模拟的焦点附近光场分布for n=1:10
I=0.1*n;
a=sqrt(1./I-1);
z=0:0.0001:a;
r=sqrt(0.5.*(1+z.^2).*log(1./(I.*(1+z.^2))));
plot(z,r, '-');
hold on
end
右半边:
for n=1:10
I=0.1*n;
a=sqrt(1./I-1);
z=0:0.0001:a;
r1=sqrt(0.5.*(1+z.^2).*log(1./(I.*(1+z.^2))));
r2=-sqrt(0.5.*(1+z.^2).*log(1./(I.*(1+z.^2))));
plot(z,r1, '-');
hold on
plot(z,r2, '-');
hold on
end
全图:
clear all
for n=1:10
I=0.1*n;
a=sqrt(1./I-1);
z=-a:0.00001*a:a;
r1=sqrt(0.5.*(1+z.^2).*log(1./(I.*(1+z.^2))));
r2=-sqrt(0.5.*(1+z.^2).*log(1./(I.*(1+z.^2))));
plot(z,r1, '-'); axis equal
hold on
plot(z,r2, '-'); axis equal
hold on
end
xlabel('Z(λ)/m');
ylabel('r(λ)/m');
title('焦点附近光场分布')
带空间坐标:
clear all
for n=1:10
I=0.1*n;
w0=200e-9;
wl=780e-9;
a=pi*w0^2*sqrt(1./I-1)/wl;
z=-a:0.0001*a:a;
r1=w0*sqrt(0.5.*(1+(wl/(pi*w0^2)).*z.^2).*log(1./(I.*(1+(wl/(pi*w0^2)).*z.^2)))); r2=-w0*sqrt(0.5.*(1+(wl/(pi*w0^2)).*z.^2).*log(1./(I.*(1+(wl/(pi*w0^2)).*z.^2)))); plot(z,r1, '-'); axis equal
hold on
plot(z,r2, '-'); axis equal
hold on
end
xlabel('Z(λ)/m');
ylabel('r(λ)/m');
title('焦点附近光场分布')
-3-2-10123
-2
-1
1
2
Y A x i s T i t l e X Axis Title
二、焦点附近的三维光场分布
三、高斯光束在传播过程中,焦点处的光强分布
1、高斯光束在光腰处的三维光强分布图
clear all
N=200;
w0=200e-9; %高斯光束的光腰半径
r=linspace(0,3*w0,N);
eta=linspace(0,2*pi,N);
[rho,theta]=meshgrid(r,eta); %生成极坐标网格
[x,y]=pol2cart(theta,rho); %将极坐标网格转化为直角坐标网格
I=exp(-2*rho.^2./w0.^2); %高斯光束在归一化的光强值
surf(x,y,I);
colormap hot; %colormap gray线性灰度图colormap hot热色颜色图去掉这句命令为彩图
shading interp;
xlabel('x /m');
ylabel('y /m');
zlabel('intensity /a.u.');
axis([-3*w0 3*w0 -3*w0 3*w0 0 1])
title('焦点附近三维光场分布')
colorbar;
2、高斯光束在光腰处的二维光强分布图
clear all
N=200;
w0=200e-9; %高斯光束的光腰半径
x=linspace(-3*w0,3*w0,N);
y=linspace(-3*w0,3*w0,N);
X=meshgrid(x,y);
Y=meshgrid(y,x);
Y=Y';
R=sqrt(X.^2+Y.^2);
I=exp(-2*R.^2./w0.^2);
imagesc(x,y,I,[0 1]); axis equal
colormap hot; %colormap gray线性灰度图colormap hot热色颜色图去掉这句命令为彩图
colorbar;
xlabel('x /m');
ylabel('y /m');
axis([-3*w0 3*w0 -3*w0 3*w0])
title('焦点附近三维光场分布')
3、高斯光束在传播过程中,焦点处的三维光强分布clear all
w0=200e-9; %高斯光束的光腰半径wavelength=780e-9; %高斯光束的光波长
ZR=pi*w0^2/wavelength; %高斯光束的瑞利长度
L=3*ZR; %高斯光束的传输范围
N=200;
z=linspace(-L,L,N);
r=linspace(-4*w0,4*w0,N);
[pr,pz]=meshgrid(r,z);
wz=w0*sqrt(1+(wavelength*pz/pi/w0^2).^2);
I=w0^2./wz.^2.*exp(-2*pr.^2./wz.^2);
surf(pz,pr,I);
shading interp;
xlabel('Z(λ) /m');
ylabel('r(λ) /m');
zlabel('intensity /a.u.');
axis([-3*ZR 3*ZR -Inf Inf -Inf Inf])
title('焦点附近三维光场分布')