function polyomino_transform_test ( )

%*****************************************************************************80
%
%% POLYOMINO_TRANSFORM_TEST tests POLYOMINO_TRANSFORM.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    25 April 2018
%
%  Author:
%
%    John Burkardt
%
%  Local parameters:
%
%    Input, integer M, N, the number of rows and columns in the representation
%    of the polyomino P.
%
%    Input, integer P(M,N), a matrix of 0's and 1's representing the 
%    polyomino.  The matrix should be "tight", that is, there should be a
%    1 in row 1, and in column 1, and in row M, and in column N.
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYOMINO_TRANSFORM_TEST:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  POLYOMINO_TRANSFORM can transform a polyomino.\n' );
  fprintf ( 1, '  Generate all 8 combinations of rotation and reflection\n' );
  fprintf ( 1, '  applied to a polyomino represented by a binary matrix.\n' );

  m = 3;
  n = 3;
  p = [ 0, 1, 1; 1, 1, 0; 0, 1, 0 ];

  polyomino_print ( m, n, p, '  The given polyomino P:' );

  for reflect = 0 : 1
    for rotate = 0 : 3

      [ mq, nq, q ] = polyomino_transform ( m, n, p, rotate, reflect );

      label = sprintf ( 1, '  P after %d reflections and %d rotations:\n', reflect, rotate );
      polyomino_print ( mq, nq, q, label );

    end
  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'POLYOMINO_TRANSFORM_TEST:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  return
end
