function house_rotation_test ( )

%*****************************************************************************80
%
%% house_rotation_test() applies the rotation map to the house.
%
%  License:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    16 January 2020
%
%  Author:
%
%    John Burkardt.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'house_rotation_test():\n' );
  fprintf ( 1, '  Apply the rotation map to the house.\n' );

  H0 = house ( );
  H0(:,end+1) = H0(:,1);
  [ m, n ] = size ( H0 );

  t1 = 15.0 * pi / 180.0;
  R1 = [ cos(t1), -sin(t1); ...
         sin(t1),  cos(t1) ];
  H1 = R1 * H0;

  t2 = 30.0 * pi / 180.0;
  R2 = [ cos(t2), -sin(t2); ...
         sin(t2),  cos(t2) ];
  H2 = R2 * H0;

  t3 = 75.0 * pi / 180.0;
  R3 = [ cos(t3), -sin(t3); ...
         sin(t3),  cos(t3) ];
  H3 = R3 * H0;

  clf ( );
  hold ( 'on' );
  plot ( H0(1,:), H0(2,:), 'c.-', 'markersize', 18, 'linewidth', 6 );
  plot ( H1(1,:), H1(2,:), 'r.-', 'markersize', 18, 'linewidth', 2 );
  plot ( H2(1,:), H2(2,:), 'g.-', 'markersize', 18, 'linewidth', 2 );
  plot ( H3(1,:), H3(2,:), 'b.-', 'markersize', 18, 'linewidth', 2 );
  hold ( 'off' );
  grid ( 'on' );
  axis ( 12 * [ -1, 1, -1, 1 ] );
  axis ( 'square' );
  title ( 'House + rotation of 15, 30 and 75 degrees' )

  filename = 'house_rotation.png';
  print ( '-dpng', filename );
  fprintf ( 1, '  Graphics saved as "%s"\n', filename );

  return
end
