function uniform_in_hexagon_test ( )

%*****************************************************************************80
%
%% uniform_in_hexagon_test() tests uniform_in_hexagon().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 April 2022
%
%  Author:
%
%    John Burkardt
%
  n = 1000;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'uniform_in_hexagon_test():\n' );
  fprintf ( 1, '  uniform_in_hexagon() maps uniform\n' );
  fprintf ( 1, '  points into the unit hexagon.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of points N =          %12d\n', n );

  p = uniform_in_hexagon ( n );
%
%  Make a plot.
%
  clf ( );
  plot ( p(:,1), p(:,2), 'b.' );
  grid ( 'on' );
  axis ( 'equal' );
  xlabel ( '<--- X --->' );
  ylabel ( '<--- Y --->' );
  title ( 'uniform\_in\_hexagon()' );
  filename = 'uniform_in_hexagon.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s".\n', filename );

  return
end
