% Plots curves in xy plane and their images in the uv plane 
% for a given function

clear
% Enter function
fn = @(x) exp(x);

% xy-plane
%plot vertical lines and images
for p=-2.0001:0.25:2;
    t = -2: 0.05: 2;
    h = p + t*i;
    subplot(1,2,1)
    plot(h,'k','LineWidth',1)
    axis( [-2,2, -2,2] )
    axis square; 
    hold on
    
    subplot(1,2,2)
    plot(fn(h),'k','LineWidth',1)
    axis( [-4,4, -4,4] )
    axis square; 
    hold on
end

% Plot horizontal lines
for p=-2.0001:0.25:2;
    t = -2: 0.05: 2;
    h = p*i + t;
    
    subplot(1,2,1)
    plot(h,'k--','LineWidth',1)
    axis( [-2,2, -2,2] )
    axis square; 
    
    
    hold on
    
    subplot(1,2,2)
    plot(fn(h),'k--','LineWidth',1)
    axis( [-4,4, -4,4] )
    axis square; 

    hold on
end
hold off