function word_to_edge_xy_test ( )

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

  [ w, p_xy ] = eternity_word ( );
  e_xy = word_to_edge_xy ( w, p_xy );
  label = 'word\_to\_edge\_xy: eternity';
  filename = 'eternity_edge_xy.png';
  edge_plot ( e_xy, label, filename );

  [ w, p_xy ] = hexagon_word ( );
  e_xy = word_to_edge_xy ( w, p_xy );
  label = 'word\_to\_edge\_xy: hexagon';
  filename = 'hexagon_edge_xy.png';
  edge_plot ( e_xy, label, filename );

  [ w, p_xy ] = hexagon3_word ( );
  e_xy = word_to_edge_xy ( w, p_xy );
  label = 'word\_to\_edge\_xy: hexagon3';
  filename = 'hexagon3_edge_xy.png';
  edge_plot ( e_xy, label, filename );

  nx = 4;
  ny = 5;
  [ w, p_xy ] = rectangle_word ( nx, ny );
  e_xy = word_to_edge_xy ( w, p_xy );
  label = sprintf ( 'word\\_to\\_edge\\_xy: rectangle %dx%d', nx, ny );
  filename = sprintf ( 'rectangle_%dx%d_edge_xy.png', nx, ny );
  edge_plot ( e_xy, label, filename );

  k = 1;
  [ w, p_xy ] = tile_word ( k );
  label = '  Boundary word for tile001:';
  word_print ( w, p_xy, label );
  e_xy = word_to_edge_xy ( w, p_xy );
  label = 'word\_to\_edge\_xy: tile001';
  filename = 'tile001_edge_xy.png';
  edge_plot ( e_xy, label, filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_to_edge_xy_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

