function word_reflect_xy_test ( )

%*****************************************************************************80
%
%% word_reflect_xy_test() tests word_reflect_xy().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 March 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_reflect_xy_test():\n' );
  fprintf ( 1, '  word_reflect_xy() takes the boundary word of an object\n' );
  fprintf ( 1, '  and a multiple of 30 degrees, and returns the boundary word of\n' );
  fprintf ( 1, '  the object after reflection about that angle.\n' );

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

  for r_angle = 0 : 30 : 180
    [ w2, p2_xy ] = word_reflect_xy ( w, p_xy, r_angle );
    v2 = word_to_vertex_xy ( w2, p2_xy ); 
    label = sprintf ( 'reflect across %d angle: tile001', r_angle );
    filename = sprintf ( 'tile001_reflect_%03d.png', r_angle );
    word_print ( w2, p2_xy, label );
    vertex_plot ( v2, label, filename );
  end

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

  return
end

