% XenoDisk
% Draws 20 disks, all with centers on x-axis
% First disk has radius 1 and center ( 1/2 , 0).
% Each succesive disk is tangent to the one before
%    and has half the radius

 
  close all
  figure
  axis equal off
  hold on

% Draw a background square
  DrawRect(0,-1,2,2,'k')

% x is the x-value of the left tangent point for the next disk.
  x = 0; 
% d  is the diameter of the next disk.
  d = 1;
  for k = 1:20
%     Draw the next disk...
      DrawDisk(x+d/2,0,d/2,'y')
%     Compute the next left tangent point and diameter...
      x = x+d;
      d = d/2;
      title(sprintf('Disks drawn = %2d',k),'FontSize',18)
      pause
  end
  hold off
  shg