function x = circular_normal_sample ( a, b )

%*****************************************************************************80
%
%% circular_normal_sample() samples the Circular Normal PDF.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 January 2011
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A(2), a parameter of the PDF, the mean value.
%
%    real B, a parameter of the PDF, the standard deviation.
%
%  Output:
%
%    real X(2), a sample of the PDF.
%
  v1 = rand ( 1, 1 );
  v2 = rand ( 1, 1 );

  r = sqrt ( - 2.0 * log ( v1 ) );

  x(1) = a(1) + b * r * cos ( 2.0 * pi * v2 );
  x(2) = a(2) + b * r * sin ( 2.0 * pi * v2 );

  return
end
