function sphere_distance_pdf ( )

%*****************************************************************************80
%
%% SPHERE_DISTANCE_PDF plots the PDF for the sphere distance problem.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    28 September 2018
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Panagiotis Siridopoulos,
%    The N-Sphere Chord Length Distribution,
%    ARXIV,
%    https://arxiv.org/pdf/1411.5639.pdf
%
  d = linspace ( 0.0, 2.0, 101 );

  pdf = d / beta ( 1.0, 0.5 );

  plot ( d, pdf, 'r-', 'linewidth', 2 );
  grid ( 'on' );
  xlabel ( '<-- Distance -->' );
  ylabel ( '<-- Probability -->' );
  title ( 'PDF for distance between pairs of random points on unit sphere' );

  return
end

