function t = triangle_hexiamond ( index )

%*****************************************************************************80
%
%% triangle_hexiamond() returns the triangle list of a given hexiamond.
%
%  Discussion:
%
%    The triangle list is a list of the IJK parallelogram triangles
%    that constitute the polyiamond.
%    If k = 0, the "ijk" triangle has vertices
%      (i-1,j-1), (i,j-1), (i-1,j).
%    If k = 1, the "ijk" triangle has vertices
%      (i,j), (i-1,j), (i,j-1).
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 November 2020
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    integer INDEX, a value between 1 and 12.
%
%  Output:
%
%    integer T(6,3): the (I,J,K) parallelogram triangle coordinates
%    of the triangles that form the hexiamond.
%

%
%  bat/chevron
% 
  if ( index == 1 )
    t = [ ... 
      1, 1, 0; ...
      1, 1, 1; ...
      2, 1, 0; ...
      2, 1, 1; ...
      2, 2, 0; ...
      2, 2, 1 ];
%
%  butterfly
%
  elseif ( index == 2 )
    t = [ ... 
      2, 1, 0; ...
      2, 1, 1; ...
      3, 1, 0; ...
      1, 2, 1; ...
      2, 2, 0; ...
      2, 2, 1];
%
%  club/crook
%
  elseif ( index == 3 )
    t = [ ... 
      1, 1, 1; ...
      2, 1, 0; ...
      2, 1, 1; ...
      3, 1, 0; ...
      3, 1, 1; ...
      1, 2, 0 ];
%
%  crown
%
  elseif ( index == 4 )
    t = [ ... 
      1, 1, 1; ...
      2, 1, 0; ...
      2, 1, 1; ...
      3, 1, 0; ...
      3, 1, 1; ...
      2, 2, 0 ];
%
%  hexagon
%
  elseif ( index == 5 )
    t = [ ... 
      1, 1, 1; ...
      2, 1, 0; ...
      2, 1, 1; ...
      1, 2, 0; ...
      1, 2, 1; ...
      2, 2, 0 ];
%
%  lobster
%
  elseif ( index == 6 )
    t = [ ... 
      1, 1, 1; ...
      1, 2, 1; ...
      1, 2, 0; ...
      2, 1, 1; ...
      2, 2, 0; ...
      1, 3, 0 ];
%
%  pistol/signpost
%
  elseif ( index == 7 )
    t = [ ... 
      1, 1, 1; ...
      1, 2, 0; ...
      1, 2, 1; ...
      2, 2, 0; ...
      2, 2, 1; ...
      1, 3, 0 ];
%
%  rhomboid/bar
%
  elseif ( index == 8 )
    t = [ ... 
      1, 1, 0; ...
      1, 1, 1; ...
      2, 1, 0; ...
      2, 1, 1; ...
      3, 1, 0; ...
      3, 1, 1 ];
%
%  shoe/hook
%
  elseif ( index == 9 )
    t = [ ... 
      1, 1, 0; ...
      1, 1, 1; ...
      1, 2, 1; ...
      1, 2, 0; ...
      2, 2, 0; ...
      2, 1, 1 ];
%
%  snake
%
  elseif ( index == 10 )
    t = [ ... 
      1, 1, 1; ...
      1, 2, 0; ...
      1, 2, 1; ...
      2, 2, 0; ...
      2, 2, 1; ...
      2, 3, 0 ];
%
%  sphinx
%
  elseif ( index == 11 )
    t = [ ... 
      1, 1, 0; ...
      1, 1, 1; ...
      2, 1, 0; ...
      2, 1, 1; ...
      3, 1, 0; ...
      1, 2, 0 ];
%
%  yacht
%
  elseif ( index == 12 )
    t = [ ... 
      1, 1, 0; ...
      1, 1, 1; ...
      2, 1, 0; ...
      2, 1, 1; ...
      1, 2, 0; ...
      2, 2, 0 ];
  else
    t = [];
  end

  return
end

