function word_to_edge_ij_test ( )

%*****************************************************************************80
%
%% word_to_edge_ij_test() tests word_to_edge_ij().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 March 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_to_edge_ij_test():\n' );
  fprintf ( 1, '  word_to_edge_ij() takes the boundary word of an object\n' );
  fprintf ( 1, '  and computes the (i,j) coordinates of the edge nodes.\n' );

  [ w, p_ij ] = eternity_grid_word ( );
  e_ij = word_to_edge_ij ( w, p_ij );
  label = 'word\_to\_edge\_ij: eternity';
  filename = 'eternity_edge_ij.png';
  edge_plot ( e_ij, label, filename );

  [ w, p_ij ] = hexagon_word ( );
  e_ij = word_to_edge_ij ( w, p_ij );
  label = 'word\_to\_edge\_ij: hexagon';
  filename = 'hexagon_edge_ij.png';
  edge_plot ( e_ij, label, filename );

  [ w, p_ij ] = hexagon3_word ( );
  e_ij = word_to_edge_ij ( w, p_ij );
  label = 'word\_to\_edge\_ij: hexagon3';
  filename = 'hexagon3_edge_ij.png';
  edge_plot ( e_ij, label, filename );

  nx = 4;
  ny = 5;
  [ w, p_ij ] = rectangle_word ( nx, ny );
  e_ij = word_to_edge_ij ( w, p_ij );
  label = sprintf ( 'word\\_to\\_edge\\_ij: rectangle %dx%d', nx, ny );
  filename = sprintf ( 'rectangle_%dx%d_edge_ij.png', nx,ny );
  edge_plot ( e_ij, label, filename );

  k = 1;
  [ w, p_ij ] = eternity_tile_word ( k );
  e_ij = word_to_edge_ij ( w, p_ij );
  label = sprintf ( 'word\\_to\\_edge\\_ij: tile%03d', k );
  filename = sprintf ( 'tile%03d_edge_ij.png', k );
  edge_plot ( e_ij, label, filename );

  [ w, p_ij ] = hat_monotile_word ( );
  label = '  Boundary word for hat monotile:';
  word_print ( w, p_ij, label );
  e_ij = word_to_edge_ij ( w, p_ij );
  label = 'word\_to\_edge\_ij: hat monotile';
  filename = 'hat_monotile_edge_ij.png';
  edge_plot ( e_ij, label, filename );

  [ w, p_ij ] = turtle_monotile_word ( );
  label = '  Boundary word for turtle monotile:';
  word_print ( w, p_ij, label );
  e_ij = word_to_edge_ij ( w, p_ij );
  label = 'word\_to\_edge\_ij: turtle monotile';
  filename = 'turtle_monotile_edge_ij.png';
  edge_plot ( e_ij, label, filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_to_edge_ij_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

