close all;
figure('Position',[90 164 873 483]);
LofWave=589.3; %wave length
Radius=5.1; %radius of the lens
GasWid=5; % length of the air gap
a1=axes('Position',[0.4,0.16,0.4,0.7]);
[x,y]=meshgrid(linspace(-0.005,0.005,200)); r=(x.^2+y.^2);
Distrib=[2*GasWid+2*(Radius-sqrt(Radius^2- r))*1e9]/LofWave;
In=abs(cos(Distrib*pi*2)); % the strength of the light
green=abs(LofWave-500)/200; % red
red=1-green; % green
blue=abs(LofWave-540)/240; %blue
ImgStr(:,:,1)=In*red; % array of the light
ImgStr(:,:,2)=In*green; ImgStr(:,:,3)=In*blue; Pc=imshow(ImgStr,[]);
figure('Position',[90 164 873 483]);
LofWave=589.3; %wave length
Radius=5.1; %radius of the lens
GasWid=5; % length of the air gap
a1=axes('Position',[0.4,0.16,0.4,0.7]);
[x,y]=meshgrid(linspace(-0.005,0.005,200)); r=(x.^2+y.^2);
Distrib=[2*GasWid+2*(Radius-sqrt(Radius^2- r))*1e9]/LofWave;
In=abs(cos(Distrib*pi*2)); % the strength of the light
green=abs(LofWave-500)/200; % red
red=1-green; % green
blue=abs(LofWave-540)/240; %blue
ImgStr(:,:,1)=In*red; % array of the light
ImgStr(:,:,2)=In*green; ImgStr(:,:,3)=In*blue; Pc=imshow(ImgStr,[]);