function tile_configurations ( tile_id )

%*****************************************************************************80
%
%% tile_configurations() displays 12 configurations of any Eternity tile.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    25 October 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer TILE_ID: the id of an Eternity tile, between 1 and 209.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'tile_configurations():\n' );
  fprintf ( 1, '  Display all 12 possible configurations of an Eternity tile:\n' );
  fprintf ( 1, '  6 rotations by a multiple of 60 degrees x 2 reflection options.\n' );

  [ w, p_ij ] = eternity_tile_word ( tile_id );
  p_xy = p_ij;

  for reflect = 0 : 1
    for r = 0 : 5
      r_angle = r * 60;
      [ w2, p2_xy ] = word_rotate_xy ( w, p_xy, r );
      if ( reflect == 1 )
        [ w2, p2_xy ] = word_reflect_xy ( w2, p2_xy, 0.0 );
      end
      v2_xy = word_to_vertex_xy ( w2, p2_xy ); 
      label = sprintf ( 'tile%03d: rotate xy %d degrees reflect %d', tile_id, r_angle, reflect );
      vertex_plot ( v2_xy, label, 'dummy.png' );
    end
  end

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

  return
end

