function shown ( A1, P1, phi1, A2, P2, phi2 )

%% shown() finds intersection of two orbits.
%
% Pre:   (A1,P1,phi1) and (A2,P2,phi2) are orbits.
%
% Post:  Applies Newton method to find an intersection of the
%        input orbits.
%
% Usage: ShowN(15,2,pi/10,20,3,-pi/8)

 
  close all
  plist = [A1 P1 phi1 A2 P2 phi2]; 
  itmax = 20;
  tol = 1e-14;
  
  % Plot Orbits
  
  figure
  Orbit(linspace(0,2*pi),A1,P1,phi1,'-');
  hold on
  Orbit(linspace(0,2*pi),A2,P2,phi2,'--');
  
  % Enter Starting Points
  
  z0 = zeros(2,1);
  tc = zeros(2,1);
  
  title('Enter starting point on solid orbit')
  [z0(1),z0(2)] = ginput(1);
  [tc(1),Orb1] = PtOnOrb(z0,P1,A1,phi1);
  plot(Orb1(1),Orb1(2),'*')
  
  title('Enter starting point on dashed orbit')
  [z0(1),z0(2)] = ginput(1);
  [tc(2),Orb2] = PtOnOrb(z0,P2,A2,phi2);
  plot(Orb2(1),Orb2(2),'*')
  title('Initial Guess')
  pause(.01)
  hold off
  
   
  % Initializations
  
  Fc =  SepV(tc,plist);   r = norm(Fc);
  Jc = JSepV(tc,plist);   c = cond(Jc);
  clc
  disp('Iteration        tc(1)                  tc(2)             norm(Fc)   cond(Jc)')
  disp('------------------------------------------------------------------------------') 
  disp(sprintf('    %2.0f   %20.16f   %20.16f     %8.3e   %8.3e',0,tc(1),tc(2),r,c)) 
  
  % The Newton Iteration
  
  k=0;
  while (k<itmax) & (r>tol)
  
     % Take a step and display
	 
	 [tc,Fc,Jc] = NStep('sepV','JsepV',tc,Fc,Jc,plist);
	 
	 k=k+1;
	 figure
	 Orbit(linspace(0,2*pi),A1,P1,phi1,'-');
	 hold on
	 Orbit(linspace(0,2*pi),A2,P2,phi2,'--');
	 Orbit(tc(1),A1,P1,phi1,'*');
	 Orbit(tc(2),A2,P2,phi2,'*');
	 hold off 
	 r = norm(Fc);
	 c = cond(Jc);
	 title(sprintf(' Iteration = %2.0f   norm(Fc) = %8.3e',k,r))
	 disp(sprintf('    %2.0f   %20.16f   %20.16f     %8.3e   %8.3e',k,tc(1),tc(2),r,c)) 
  end
  
  sol = Orbit(tc(1),A1,P1,phi1);
  disp(sprintf('\n Intersection = ( %17.16f , %17.16f )',sol))
 
  return
end

