function uniform_on_ellipse_test ( )

%*****************************************************************************80
%
%% uniform_on_ellipse_test() tests uniform_on_ellipse().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 April 2022
%
%  Author:
%
%    John Burkardt
%
  file_out_name = 'uniform_on_ellipse.txt';
  n = 100;
  a = 2.0;
  b = 3.0;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'uniform_on_ellipse_test():\n' );
  fprintf ( 1, '  uniform_on_ellipse() returns uniform random points\n' );
  fprintf ( 1, '  on an ellipse (x/a)^2+(y/b)^2=1.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  N = %12d\n', n );
  fprintf ( 1, '  A = %12g\n', a );
  fprintf ( 1, '  B = %12g\n', b );

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

  return
end
