返回首页

LightPipes——MatLab物理光学仿真工具包

图片1

LightPipes介绍

LightPipes is a set of software tools for simulation of propagation, diffraction and interference of coherent light. Algorithms are based on the scalar theory of diffraction. The toolbox includes spectral, FFT-based and finite-difference based propagation models. Special tools have been developedd for the propagation through lenses with coordinate transforms, simulation of any combination of Zernike aberrations, mode analysis in laser resonators, interferometers, inverse problems, waveguides and propagation in media with non-uniform distribution of refraction index.

官方网站:http://www.okotech.com/lightpipes

安装方法

安装方法很简单,就是将文件解压后,将文件目录设置为matlab库的路径就可以了,具体方法为:

图片1

工具包下载

LightPipes v1.3无限制使用版:LightPipesforMalLab_v1.3.rar

设计实例

1.双缝干涉

%双光束干涉
clc;clear;close all;
%
mm=1e-3;um=1e-6;m=1;
N=512;                           %采样密度
size=5*mm;                       %采样范围
lambda=0.55*um;                  %波长
d=1*mm;                          %双缝距离
a=0.1*mm;                        %缝宽
dL=[10*mm,100*mm,300*mm,800*mm]; %观测屏距离
%
for i=1:4
    L=dL(i);
    F=LPBegin(size,lambda,N);
    F1=LPRectAperture(size,a,0,d/2,0,F);
    F2=LPRectAperture(size,a,0,-d/2,0,F);
    F=LPBeamMix(F1,F2);
    F=LPFresnel(L,F);
    I=LPIntensity(0,F);
    x=linspace(-size/2,size/2,N)/mm;
    subplot(2,2,i);
    imagesc(x,x,I);colormap('gray');
    title(['观测距离:',num2str(L/mm),'mm']);
end

图片1

2.Michelson干涉

有空来

3.圆屏衍射

4.小孔衍射

5.菲涅尔衍射