function [ adj, t1_ij ] = tile158_adjacency ( )

%*****************************************************************************80
%
%% tile158_adjacency() returns adjacency information for tile #158.
%
%  Discussion:
%
%    As a quick fix, I swapped triangles 1 and 21, so the picture is
%    drawn correctly.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Output:
%
%    integer ADJ(36,3): ADJ(I,J) describes the J-th neighbor of the 
%    I-th 30-60-90 triangle.  Neighbor J=1 is across from the 30 degree angle,
%    J=2 from the 60 degree angle, and J=3 from the 90 degree angle.
%
%    integer t1_ij(3,2), the (i,j) vertex coordinates of 30-60-90 triangle #1.
%
  adj = [ ...
    20, -1, 22; ... % 1
     3,  9, 21; ... % 2
     2,  4, -1; ... % 3
     9,  3,  5; ... % 4
     6, 14,  4; ... % 5
     5, 15,  7; ... % 6
     8, 11,  6; ... % 7
     7, 10,  9; ... % 8
     4,  2,  8; ... % 9
    11,  8, -1; ... % 10
    10,  7, 12; ... % 11
    -1, -1, 11; ... % 12
    18, -1, 14; ... % 13
    15,  5, 13; ... % 14
    14,  6, 16; ... % 15
    17, 19, 15; ... % 16
    16, 24, 18; ... % 17
    13, 36, 17; ... % 18
    24, 16, 20; ... % 19
     1, -1, 19; ... % 20
    -1, -1,  2; ... % 21
    23, -1,  1; ... % 22
    22, 25, 24; ... % 23
    19, 17, 23; ... % 24
    -1, 23, 26; ... % 25
    27, 29, 25; ... % 26
    26, 28, -1; ... % 27
    29, 27, -1; ... % 28
    28, 26, 30; ... % 29
    -1, 31, 29; ... % 30
    -1, 30, 32; ... % 31
    33, 35, 31; ... % 32
    32, 34, -1; ... % 33
    35, 33, -1; ... % 34
    34, 32, 36; ... % 35
    -1, 18, 35 ];   % 36

  t1_ij = [ ...
    0, 0; ...
    2, 2; ...
    2, 0 ];

  return
end

