function r = randInCircle( n, radius )
% Uniform distribution in the unit circle.
  angle(1:n) = 2.0 * pi * rand(1,n);
  radius(1:n) = radius * sqrt ( rand(1,n) );

  r(1,1:n) = radius(1:n) .* cos ( angle(1:n) );
  r(2,1:n) = radius(1:n) .* sin ( angle(1:n) );
end

