function word_reverse_test ( )

%*****************************************************************************80
%
%% word_reverse_test() tests word_reverse().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 March 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_reverse_test():\n' );
  fprintf ( 1, '  word_reverse() takes the boundary word of an object\n' );
  fprintf ( 1, '  and produces the boundary word corresponding to a\n' );
  fprintf ( 1, '  traversal of the same object in the reverse direction.\n' );

  k = 1;
  [ w, p_xy ] = tile_word ( k );
  v = word_to_vertex_xy ( w, p_xy ); 
  label = 'reversal none: tile001';
  word_print ( w, p_xy, label );
  filename = 'tile001_reversal_none.png';
  vertex_plot ( v, label, filename );

  [ w2, p2_xy ] = word_reverse ( w, p_xy );
  v2 = word_to_vertex_xy ( w2, p2_xy ); 
  label = 'reversal: tile001:';
  word_print ( w2, p2_xy, label );
  filename = 'tile001_reversal.png';
  vertex_plot ( v2, label, filename );

  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_reverse_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

