Matlab高斯光束焦点光强分布.docx
《Matlab高斯光束焦点光强分布.docx》由会员分享,可在线阅读,更多相关《Matlab高斯光束焦点光强分布.docx(9页珍藏版)》请在冰豆网上搜索。
![Matlab高斯光束焦点光强分布.docx](https://file1.bdocx.com/fileroot1/2022-10/25/5210fa2c-d440-4382-88c3-f8c5203f8a69/5210fa2c-d440-4382-88c3-f8c5203f8a691.gif)
Matlab高斯光束焦点光强分布
一、高斯光束模拟的焦点附近光场分布
forn=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,'-');
holdon
end
右半边:
forn=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,'-');
holdon
plot(z,r2,'-');
holdon
end
全图:
clearall
forn=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,'-');axisequal
holdon
plot(z,r2,'-');axisequal
holdon
end
xlabel('Z(λ)/m');
ylabel('r(λ)/m');
title('焦点附近光场分布')
带空间坐标:
clearall
forn=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,'-');axisequal
holdon
plot(z,r2,'-');axisequal
holdon
end
xlabel('Z(λ)/m');
ylabel('r(λ)/m');
title('焦点附近光场分布')
二、焦点附近的三维光场分布
三、高斯光束在传播过程中,焦点处的光强分布
1、高斯光束在光腰处的三维光强分布图
clearall
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);
colormaphot;%colormapgray线性灰度图colormaphot热色颜色图去掉这句命令为彩图
shadinginterp;
xlabel('x/m');
ylabel('y/m');
zlabel('intensity/a.u.');
axis([-3*w03*w0-3*w03*w001])
title('焦点附近三维光场分布')
colorbar;
2、高斯光束在光腰处的二维光强分布图
clearall
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,[01]);axisequal
colormaphot;%colormapgray线性灰度图colormaphot热色颜色图去掉这句命令为彩图
colorbar;
xlabel('x/m');
ylabel('y/m');
axis([-3*w03*w0-3*w03*w0])
title('焦点附近三维光场分布')
3、高斯光束在传播过程中,焦点处的三维光强分布
clearall
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);
shadinginterp;
xlabel('Z(λ)/m');
ylabel('r(λ)/m');
zlabel('intensity/a.u.');
axis([-3*ZR3*ZR-InfInf-InfInf])
title('焦点附近三维光场分布')
colorbar;
colormaphot;%colormapgray线性灰度图colormaphot热色颜色图
view
(2)%显示二维视图