function value = hexagon01_integral ( p, q )

%*****************************************************************************80
%
%% hexagon01_integral() evaluates a monomial integral in the unit hexagon.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 April 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer N, the number of vertices of the polygon.
%
%    real X(N), Y(N), the vertex coordinates.
%
%    integer P, Q, the indices of the moment.
%
%  Output:
%
%    real VALUE, the integral of x^p y^q.
%
  if ( mod ( p, 2 ) == 1 || mod ( q, 2 ) == 1 )
    value = 0.0;
  else
    n = 6;
    a = sqrt ( 3.0 ) / 2.0;
    x = [ 1.0, 0.5, -0.5, -1.0, -0.5,  0.5 ];
    y = [ 0.0, a,    a,    0.0, -a,   -a ];
    value = moment_unnormalized ( n, x, y, p, q );
  end

  return
end
