function polygon_centroid_test ( )

%*****************************************************************************80
%
%% POLYGON_CENTROID_TEST tests POLYGON_CENTROID.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    15 October 2015
%
%  Author:
%
%    John Burkardt
%
  n = 4;
  v = [ ...
    1.0, 0.0; ...
    2.0, 1.0; ...
    1.0, 2.0; ...
    0.0, 1.0 ]';

  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYGON_CENTROID_TEST\n' );
  fprintf ( 1, '  POLYGON_CENTROID computes the centroid of a polygon.\n' );

  r8mat_transpose_print ( 2, n, v, '  The polygon vertices:' );

  centroid = polygon_centroid ( n, v );

  r8vec_print ( 2, centroid, '  POLYGON_CENTROID:' );

  return
end
