function triangle_distance_histogram_test ( )

%*****************************************************************************80
%
%% triangle_distance_histogram_test tests triangle_distance_histogram.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    20 February 2019
%
%  Author:
%
%    John Burkardt
%
  n = 10000;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'triangle_distance_histogram_test\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test triangle_distance_histogram.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of sample points N = %d\n', n );
%
%  Equilateral triangle with side 1.
%
  v = [ ...
    0.00, 0.00;...
    1.00, 0.00; ...
    0.500, sqrt(3.0)/2.0 ];

  triangle_print ( v, '  Equilateral triangle vertices:' );

  triangle_distance_histogram ( v, n );
  pause ( 5 )
%
%  Unit right triangle.
%
  v = [ ...
    0.00, 0.00;...
    1.00, 0.00; ...
    0.00, 1.00 ];

  triangle_print ( v, '  Unit right triangle vertices:' );

  triangle_distance_histogram ( v, n );
  pause ( 5 )
%
%  345 right triangle.
%
  v = [ ...
    0.00, 0.00;...
    3.00, 0.00; ...
    0.00, 4.00 ];

  triangle_print ( v, '  345 right triangle Vertices:' );

  triangle_distance_histogram ( v, n );
  pause ( 5 )
%
%  scalene triangle.
%
  v = [ ...
    0.75, 0.90;...
    0.00, 0.20; ...
    0.95, 0.65 ];

  triangle_print ( v, '  scalene triangle Vertices:' );

  triangle_distance_histogram ( v, n );
  pause ( 5 )

  return
end
