function word_rotate_xy_test ( )

%*****************************************************************************80
%
%% word_rotate_xy_test() tests word_rotate_xy().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    07 January 2022
%
%  Author:
%
%    John Burkardt
%
%  Local:
%
%    integer TILE_ID: the id of an Eternity tile, between 1 and 209.
%
  tile_id = 1;

  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' );

  [ w, p_ij ] = eternity_tile_word ( tile_id );
  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 ( 'tile%03d: rotate %d degrees ', tile_id, r_angle );
    filename = sprintf ( 'tile%03d_rotate_%03d.png', tile_id, 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

