function p = disk_unit_sample ( )

%*****************************************************************************80
%
%% disk_unit_sample returns a randomly selected point from the unit disk.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 September 2018
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    real P(2,1), a point selected uniformly at random from
%    the disk of radius 1 and center (0,0).
%
  theta = 2.0 * pi * rand ( 1, 1 );
  r = sqrt ( rand ( 1, 1 ) );
  p = [ r*cos(theta); r*sin(theta) ];

  return
end

