function polygon_integral_xx_test ( )

%*****************************************************************************80
%
%% POLYGON_INTEGRAL_XX_TEST tests POLYGON_INTEGRAL_XX.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    15 October 2015
%
%  Author:
%
%    John Burkardt
%
  n1 = 4;
  v1 = [ ...
    0.0, 0.0; ...
    1.0, 0.0; ...
    1.0, 1.0; ...
    0.0, 1.0 ]';

  n2 = 3;
  v2 = [ ...
    1.0, 1.0; ...
    4.0, 3.0; ...
    2.0, 5.0 ]';

  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYGON_INTEGRAL_XX_TEST\n' );
  fprintf ( 1, '  POLYGON_INTEGRAL_XX integrates x^2 over a polygon\n' );

  r8mat_transpose_print ( 2, n1, v1, '  The polygon vertices:' );

  result = polygon_integral_xx ( n1, v1 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  x^2:  %14.6g\n', result );

  r8mat_transpose_print ( 2, n2, v2, '  The polygon vertices:' );

  result = polygon_integral_xx ( n2, v2 );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  x^2:  %14.6g\n', result );

  return
end
