function area = annulus_area ( r1, r2 )

%*****************************************************************************80
%
%% annulus_area() computes the area of a annulus centered at the origin.
%
%  Discussion:
%
%    A circular annulus centered at the origin, with inner radius R1 and
%    outer radius R2, is the set of points (X,Y) so that
%
%      R1^2 <= X^2 + Y^2 <= R2^2
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    04 July 2018
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real r1, r2: the inner and outer radii.
%    0.0 <= R1, and normally R1 <= R2.
%
%  Output:
%
%    real area: the area of the annulus.
%
  if ( r1 < 0.0 )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'annulus_area(): Fatal error!\n' );
    fprintf ( 1, '  Inner radius R1 < 0.0.\n' );
    error ( 'annulus_area(): Fatal error!' );
  end

  area = pi * ( r2 + r1 ) * ( r2 - r1 );

  return
end
