function word_rotate_test ( )

%*****************************************************************************80
%
%% word_rotate_test() tests word_rotate().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    08 December 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_rotate_test():\n' );
  fprintf ( 1, '  word_rotate() rotates a polyabolo by multiples of 90 degrees.\n' );

  [ w, p ] = gort_word ( );
  word_print ( w, p, 'Gort' );

  r = 1;
  [ w2, p2 ] = word_rotate ( w, p, r );
  label = sprintf ( 'Gort after %d degree rotation', r * 90 );
  word_print ( w2, p2, label );
%
%  Draw the grid.
%
  [ imin, imax, jmin, jmax ] = word_range ( w2, p2 );
  imax = imax + 1;
  jmax = jmax + 1;

  clf ( );
  hold ( 'on' );
  r = 0.85;
  color_back = 'cyan';
  color_tri = 'yellow';
  number = false;
  grid_plot ( imin, imax, jmin, jmax, r, color_back, color_tri, number );
%
%  Draw the polyabolo on top of the grid.
%
  color = 'cyan';
  number = true;
  word_plot ( w2, p2, color, number );

  axis ( 'equal' );
  axis ( 'off' );
  label = s_escape_tex ( 'word_rotate: gort' );
  title ( label )
  hold ( 'off' );

  filename = 'word_rotate_test.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'word_rotate_test():\n' );
  fprintf ( 1, '  Normal end of execution.\n' );

  return
end

