function polygon_distance_histogram_test ( )

%*****************************************************************************80
%
%% polygon_distance_histogram_test() tests polygon_distance_histogram().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 June 2019
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polygon_distance_histogram_test()\n' );
  fprintf ( 1, '  MATLAB/Octave version %s\n', version ( ) );
  fprintf ( 1, '  Test polygon_distance_histogram().\n' );

  nv = 10;

  v = [ ...
    [0.0; 0.0], ...
    [0.5; 0.3], ...
    [1.0; 0.0], ...
    [0.7; 0.4], ...
    [1.0; 0.6], ...
    [0.6; 0.6], ...
    [0.5; 1.0], ...
    [0.4; 0.6], ...
    [0.0; 0.6], ...
    [0.3; 0.4] ]; 

  r8mat_transpose_print ( 2, nv, v, '  Polygonal vertices:' );

  n = 10000;
  polygon_distance_histogram ( n, nv, v );

  filename = 'polygon_distance_histogram_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'polygon_distance_histogram_test\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end
