function word_rotate_xy_test ( )

%*****************************************************************************80
%
%% word_rotate_xy_test() tests word_rotate_xy().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 May 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_rotate_xy_test():\n' );
  fprintf ( 1, '  word_rotate_xy() takes the boundary word of an object\n' );
  fprintf ( 1, '  and a multiplier R of 60 degrees, and returns the boundary\n' );
  fprintf ( 1, '  word of the object after rotation by 60*R degrees.\n' );

  k = 1;
  [ w, p_ij ] = tile_word ( k );
  p_xy = p_ij;

  for r = 0 : 5
    r_angle = r * 60;
    [ w2, p2_xy ] = word_rotate_xy ( w, p_xy, r );
    v2 = word_to_vertex_xy ( w2, p2_xy ); 
    label = sprintf ( 'rotate %d degrees: tile001', r_angle );
    filename = sprintf ( 'tile001_rotate_%03d.png', r_angle );
    word_print ( w2, p2_xy, label );
    vertex_plot ( v2, label, filename );
  end

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

  return
end

