clear clc % simulation parameters c=299792458; % light speed in vacuum Frep=160.3084e6; % laser repetition rate D=0.07; % side distance between "output" windows of the vessel DR=0.12; % side distance between "input" windows of the vessel L0=1.02; % cavity box length L3=0.505; % distance between spherical mirrors theta1=linspace(0.115,0.120,1e3); % calculated parameters Lrt=c/Frep; theta2=2*atan(1./((Lrt/D)-1./tan(theta1/2))); L2=D./sin(theta2); L4=D./sin(theta1); L1=Lrt-L2-L3-L4; LM3=(DR-D)./tan(theta2); LM2=L0-DR./tan(theta2); LM1=L0-L1-LM2; LM4=L0-L3-LM3; id=LM1>0.15 & LM2>0.15 & LM3>0.15 & LM4>0.15 & abs(LM1-LM3)>0.08 & abs(LM2-LM4)>0.08; L1(~id)=0; L2(~id)=0; L4(~id)=0; LM1(~id)=0; LM2(~id)=0; LM3(~id)=0; LM4(~id)=0; figure(1) clf plot(theta1*1e3,L1) hold on plot(theta1*1e3,L2) plot(theta1*1e3,L4) plot(theta1*1e3,LM1) plot(theta1*1e3,LM2) plot(theta1*1e3,LM3) plot(theta1*1e3,LM4) grid on legend('L1','L2','L4','LM1','LM2','LM3','LM4','location','best') xlabel('theta1 angle (mrad)') ylabel('length parameters (m)') id=find(id~=0); id=id(1); disp(['LRT = ' num2str(Lrt) ' m']) disp(['D = ' num2str(D*1e3) ' mm']) disp(['theta1 = ' num2str(theta1(id)*1e3) ' mrad']) disp(['theta2 = ' num2str(theta2(id)*1e3) ' mrad']) disp(['L1 = ' num2str(L1(id)*1e3) ' mm']) disp(['L2 = ' num2str(L2(id)*1e3) ' mm']) disp(['L3 = ' num2str(L3*1e3) ' mm']) disp(['L4 = ' num2str(L4(id)*1e3) ' mm']) disp(' ') disp(['L0 = ' num2str(L0) ' m']) disp(['DR = ' num2str(DR*1e3) ' mm']) disp(['LM1 = ' num2str(LM1(id)*1e3) ' mm']) disp(['LM2 = ' num2str(LM2(id)*1e3) ' mm']) disp(['LM3 = ' num2str(LM3(id)*1e3) ' mm']) disp(['LM4 = ' num2str(LM4(id)*1e3) ' mm']) disp(['LM3-LM1 = ' num2str((LM3(id)-LM1(id))*1e3) ' mm']) disp(['LM2-LM4 = ' num2str((LM2(id)-LM4(id))*1e3) ' mm'])