triplet129

Contents

define lens

clear
% radius of curvature
rd = [0 24.110 215.090 -94.81 23.76 0 104.5 -63.89];
idx = find(rd);
cv = zeros(size(rd));
cv(idx) = 1./rd(idx);
th = [0 3.7 4.66 1.6 2.37 6.76 3.5 0];
rn = [1 1.613 1 1.596 1 1 1.613 1];
lp = find(rn>1);
sa = [0 11.4 11.4 7 7 6.6 10.7 10.7];
ast = 6; % location of aperture stop
fno = 6.3;
hfov = 27; % degrees

axial ray

% axial ray (infinite conjugate)
py = parax([7 0],cv,th,rn);
% calculate effective focal length
n = length(rd);
efl = -py(1,1)/py(n+1,2);
fprintf('efl %g\n',efl);
efl 99.9744
% paraxial thickness solve for image distance
th(n) = -py(n,1)/py(n,2);
fprintf('bfd %g\n',th(n));
bfd 84.1487
% set entrance pupil diameter

fprintf('fno %g\n\n',fno);

D = efl/fno;
pya = parax([D/2 0],cv,th,rn);
fprintf('height of entering axial ray %g\n',pya(1));
fno 6.3

height of entering axial ray 7.93448

chief ray

% trial chief ray
uco = tan(hfov*pi/180);
py = parax([0 uco],cv,th,rn);
% adjust ray to pass through stop
k = -py(ast,1)/pya(ast,1);
fprintf('k %g\n',k);
pyc = py + k*pya;
k -0.856214

show specifications

fprintf('\nsystem specification\n');
fprintf('\n%4s%12s%10s%8s%8s\n','n','rd','th','index','sa');
for k=1:n
    fprintf('%4d%12.4f%10.4f%8.4f%8.2f\n',k-1,rd(k),th(k),rn(k),sa(k));
end
system specification

   n          rd        th   index      sa
   0      0.0000    0.0000  1.0000    0.00
   1     24.1100    3.7000  1.6130   11.40
   2    215.0900    4.6600  1.0000   11.40
   3    -94.8100    1.6000  1.5960    7.00
   4     23.7600    2.3700  1.0000    7.00
   5      0.0000    6.7600  1.0000    6.60
   6    104.5000    3.5000  1.6130   10.70
   7    -63.8900   84.1487  1.0000   10.70

show paraxial raytrace

fprintf('\nparaxial raytrace\n');
fprintf('\n%4s%11s%11s%11s%11s\n','n','pya','pua','pyc','puc');
for k=1:n+1
    fprintf('%4d%11.4f%11.4f%11.4f%11.4f\n', ...
        k-1,pya(k,1),pya(k,2),pyc(k,1),pyc(k,2))
end

gih = pyc(n+1,1);
fprintf('\ngaussian image height (GIH) %g\n',gih);
L = pya(1,1)*pyc(1,2)-pyc(1,1)*pya(1,2);
fprintf('Lagrange invariant %g\n',L);
paraxial raytrace

   n        pya        pua        pyc        puc
   0     7.9345     0.0000    -6.7936     0.5095
   1     7.9345    -0.1251    -6.7936     0.4230
   2     7.4717    -0.1804    -5.2286     0.6674
   3     6.6309    -0.0869    -2.1188     0.4098
   4     6.4918     0.0241    -1.4631     0.6173
   5     6.5488     0.0241     0.0000     0.6173
   6     6.7116    -0.0095     4.1732     0.3675
   7     6.6785    -0.0794     5.4596     0.5405
   8     0.0000    -0.0794    50.9395     0.5405

gaussian image height (GIH) 50.9395
Lagrange invariant 4.04282

draw lens

drawsys(sa,th,cv,lp);
axis([-1 25 -13 13]);

paraxial trace

figure
% optical axis
plot([0 60],[0 0],'g');
axis([0 60 -15 15]);
hold on
% plot surface positions
z = [0 5 5+cumsum(th)]';
for k=1:n
    zt = z(k+1);
    plot([zt zt],[-sa(k) sa(k)],'k--');
end
y = [pya(1,1); pya(:,1)];
plot(z,y,'b','LineWidth',2);
y = [pyc(1,1)-5*pyc(1,2); pyc(:,1)];
plot(z,y,'r','LineWidth',2);
hold off