function uniform_on_triangle_test ( )

%*****************************************************************************80
%
%% uniform_on_triangle_test() tests uniform_on_triangle().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 April 2022
%
%  Author:
%
%    John Burkardt
%
  n = 100;
  v = [ ...
    0.75, 0.90;
    0.00, 0.20;
    0.95, 0.65 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'uniform_on_triangle_test():\n' );
  fprintf ( 1, '  uniform_on_triangle() maps uniform \n' );
  fprintf ( 1, '  points onto the surface of the unit triangle.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Number of points N =          %12d\n', n );

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

  return
end
