function uniform_in_simplex_test ( )

%*****************************************************************************80
%
%% uniform_in_simplex_test() tests uniform_in_simplex().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    13 April 2022
%
%  Author:
%
%    John Burkardt
%
  n = 1000;
  d = 2;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'uniform_in_simplex_test():\n' );
  fprintf ( 1, '  uniform_in_simplex() maps uniform \n' );
  fprintf ( 1, '  points into the unit simplex.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of points N =  %12d\n', n );
  fprintf ( 1, '  Spatial dimension D = %12d\n', d );

  p = uniform_in_simplex ( n, d );
%
%  Plot the results.
%
  clf ( );
  hold ( 'on' );
  plot ( p(:,1), p(:,2), 'bo' );
  hold ( 'off' );
  xlabel ( '<--- X --->' );
  ylabel ( '<--- Y --->' );
  title ( 'uniform\_in\_simplex()' );
  grid ( 'on' );
  axis ( 'equal' );
  filename = 'uniform_in_simplex.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
