function p = ellipse_unit_sample ( n, a, b )

%*****************************************************************************80
%
%% ellipse_sample returns randomly selected points on an ellipse.
%
%  Discussion:
%
%    The ellipse is assumed to have the equation:
%
%      (x/a)^2 + (y/b)^2 = 1
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 March 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of points to compute.
%
%    real A, B: the ellipse parameters:
%
%  Output:
%
%    real P(N,2), points uniformly distributed on the perimeter of the ellipse.
%
  p = rand ( n, 2 );
  p(:,1) = a * p(:,1);
  p(:,2) = b * p(:,2);

  return
end

