function circle_positive_distance_histogram ( n )

%*****************************************************************************80
%
%% circle_positive_distance_histogram histograms positive circle distance statistics.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    10 August 2023
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer n: the number of samples to use.
%
  t = zeros ( n, 1 );
  for i = 1 : n
    p = circle_positive_sample ( );
    q = circle_positive_sample ( );
    t(i) = norm ( p - q );
  end

  bins = 20;
  histogram ( t, bins, 'Binlimits', [0.0,sqrt(2.0)], 'Normalization', 'pdf' );
  grid ( 'on' );
  xlabel ( '<-- Distance -->' );
  ylabel ( '<-- Frequency -->' );
  title ( 'Distance between a pair of random points on a unit positive circle' );

  return
end
