function word_range_xy_test ( )

%*****************************************************************************80
%
%% word_range_xy_test() tests word_range_xy().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 March 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_range_xy_test():\n' );
  fprintf ( 1, '  word_range_xy() takes the boundary word of an\n' );
  fprintf ( 1, '  object, and returns the minimum and maximum x and y coordinates.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Object                 xmin   xmax   ymin   ymax\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 5

    if ( i == 1 )
      [ w, p_ij ] = eternity_grid_word ( );
      label = 'eternity';
    elseif ( i == 2 )
      [ w, p_ij ] = hexagon_word ( );
      label = 'hexagon';
    elseif ( i == 3 )
      [ w, p_ij ] = hexagon3_word ( );
      label = 'hexagon3';
    elseif ( i == 4 )
      nx = 4;
      ny = 5;
      [ w, p_ij ] = rectangle_word ( nx, ny );
      label = 'rectangle 4x5';
    elseif ( i == 5 )
      k = 1;
      [ w, p_ij ] = eternity_tile_word ( k );
      label = sprintf ( 'tile%03d', k );
    end

    p_xy = p_ij;
    [ xmin, xmax, ymin, ymax ] = word_range_xy ( w, p_xy );
    fprintf ( 1, '  %-20s  %5.2f  %5.2f  %5.2f  %5.2f\n', label, xmin, xmax, ymin, ymax );

  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_range_xy_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

