% Tony Hyun Kim

% Transfer matrix approach for design of zoom-optic telescope

% Essentially, I am using Matlab to help me crunch these matrices



% Sizes given in mm

F1 = 200;

F2 = -100;

F3 = 25.4;



% d1 = 120;

% d2 = F1 + F3 - d1;



L1 = [1 0; -1/F1 1];

L2 = [1 0; -1/F2 1];

L3 = [1 0; -1/F3 1];



% FS1 = [1 d1; 0 1];

% FS2 = [1 d2; 0 1];

% 

% M = L3*FS2*L2*FS1*L1;



% Get a curve

d = linspace(20,200);

results = zeros(100,2);

for i=1:100

    d1 = d(i);

    d2 = F1 + F3 - d1;

    FS1 = [1 d1; 0 1];

    FS2 = [1 d2; 0 1];

    M = L3*FS2*L2*FS1*L1;

    results(i,:) = M(2,:);

end



plot(d,results(:,1)); hold on;

plot(d,results(:,2),'r'); grid on;

xlabel('Position of the intermediate lens');

ylabel('Position dependence (C) [blue]; angular magnification (D) [red]');

title('Design of zoom-optic system by adding a third lens');