function annulus_distance_histogram ( n, pc, r1, r2 )

%*****************************************************************************80
%
%% annulus_distance_histogram() histograms annulus distance statistics.
%
%  Discussion:
%
%    A circular annulus with center PC, inner radius R1 and
%    outer radius R2, is the set of points P so that
%
%      R1^2 <= (P(1)-PC(1))^2 + (P(2)-PC(2))^2 <= R2^2
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 August 2022
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of points to generate.
%
%    real PC(2), the center.
%
%    real R1, R2, the inner and outer radii.
%
  p = annulus_sample ( n, pc, r1, r2 );
  q = annulus_sample ( n, pc, r1, r2 );

  t = zeros ( n, 1 );
  for i = 1 : n
    t(i) = norm ( p(i,:) - q(i,:) );
  end

  tmax = 2.0 * r2;
  bins = 20;
  normal = 1.0;
  hist ( t, bins, normal );
  grid ( 'on' );
  xlabel ( '<-- Distance -->' );
  ylabel ( '<-- Frequency -->' );
  label = sprintf ( 'Point distances in annulus, r1 = %g, r2 = %g\n', r1, r2 );
  title ( label );

  return
end

