function polygon_diameter_test ( )

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

  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYGON_DIAMETER_TEST\n' );
  fprintf ( 1, '  POLYGON_DIAMETER computes the diameter of a polygon.\n' );

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

  diameter = polygon_diameter ( n, v );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Diameter ( computed ) %g\n', diameter );
  fprintf ( 1, '  Diameter ( exact )    %g\n', diameter_exact );
 
  return
end
