function word_area_test ( )

%*****************************************************************************80
%
%% word_area_test() tests word_area().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 November 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_area_test():\n' );
  fprintf ( 1, '  word_area() counts the elemental triangles contained\n' );
  fprintf ( 1, '  in a polygon defined by a boundary word.\n' );
  fprintf ( 1, '\n' );

  [ w, p_ij ] = eternity_grid_word ( );
  area = word_area ( w, p_ij );
  fprintf ( 1, '  eternity area = %d\n', area );
  fprintf ( 1, '  (should be 209 * 36 = %d\n', 209 * 36 );

  [ w, p_ij ] = hexagon_word ( );
  area = word_area ( w, p_ij );
  fprintf ( 1, '  hexagon area = %d\n', area );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Eternity tiles should all have area 36\n' );
  fprintf ( 1, '\n' );
  for id = 1 : 209
    [ w, p_ij ] = eternity_tile_word ( id );
    area = word_area ( w, p_ij );
    fprintf ( 1, '  Eternity tile #%d = %g\n', id, area );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Trinity tiles should all have area 36\n' );
  fprintf ( 1, '\n' );
  for id = 210 : 213
    [ w, p_ij ] = eternity_tile_word ( id );
    area = word_area ( w, p_ij );
    fprintf ( 1, '  Trinity tile #%d = %g\n', id, area );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Serenity tiles should all have area 36\n' );
  fprintf ( 1, '\n' );
  for id = 214 : 221
    [ w, p_ij ] = eternity_tile_word ( id );
    area = word_area ( w, p_ij );
    fprintf ( 1, '  Serenity tile #%d = %g\n', id, area );
  end

  return
end

