boundary_word_hexagon
    
    
    
      boundary_word_hexagon,
      an Octave code which
      describes the outline of an object on a grid of hexagons,
      using a string of symbols that represent the sequence of steps
      tracing out the boundary.
    
    
      Objects constructed by connecting congruent regular hexagons
      are known as polyhexes.
    
    
      Licensing:
    
    
      The information on this web page is distributed under the MIT license.
    
    
      Languages:
    
    
      boundary_word_hexagon is available in
      a MATLAB version and
      an Octave version and
      a Python version.
    
    
      Related Data and Programs:
    
    
      
      boundary_word_hexagon_test
    
    
      
      boundary_word_drafter,
      an Octave code which
      describes the outline of an object on a grid of drafters,
      or 30-60-90 triangles, using a string of symbols that represent 
      the sequence of steps tracing out the boundary.  
    
    
      
      boundary_word_equilateral,
      an Octave code which
      describes the outline of an object on a grid of equilateral triangles,
      using a string of symbols that represent the sequence of steps
      tracing out the boundary.
    
    
      
      boundary_word_right,
      an Octave code which
      describes the outline of an object on a grid of isoceles right triangles,
      using a string of symbols that represent the sequence of steps
      tracing out the boundary.
    
    
      
      boundary_word_square,
      an Octave code which
      describes the outline of an object on a grid of squares,
      using a string of symbols that represent the sequence of steps
      tracing out the boundary.
    
    
      Reference:
    
    
      
        - 
          Martin Gardner,
 
          Mathematical Games: 
          On Polyiamonds: Shapes That are Made Out of Equilateral Triangles,
          Scientific American,
          Volume 211, December 1964.
         
        - 
          Marcus Garvie, John Burkardt,
          A new mathematical model for tiling finite regions of the plane
          with polyominoes,
          Contributions to Discrete Mathematics,
          Volume 15, Number 2, July 2020.
         
        - 
          Solomon Golomb,
          Polyominoes: Puzzles, Patterns, Problems, and Packings,
          Princeton University Press, 1996,
          ISBN: 9780691024448
         
        - 
          Thomas O'Beirne,
          Pentominoes and Hexiamonds,
          New Scientist,
          Volume 12, pages 379-380, 1961.
         
        - 
          Torbijn,
          Polyiamonds,
          Journal of Recreational Mathematics,
          Volume 2, pages 216-227, 1969.
         
      
    
    
      Source code:
    
    
      
        - 
          
          boolean_to_string.m,
          given a boolean value,
          returns the character vector 'True' or 'False'.
        
 
        - 
          
          boundary_plot.m,
          given the boundary word of a polyhex,
          creates a plot.
        
 
        - 
          
          boundary_print.m,
          given the boundary word of a polyhex,
          prints it.
        
 
        - 
          
          boundary_range.m,
          given the boundary word of a polyhex, 
          returns its range in the I and J directions.
        
 
        - 
          
          boundary_reflect.m,
          given the boundary word of a polyhex,
          returns the boundary word and base point after
          reflection across the 0, 60, or 120 degree axis.
        
 
        - 
          
          boundary_representative.m,
          returns the representative for a boundary word, 
          the lexically first member of the equivalence class.
        
 
        - 
          
          boundary_rotate.m,
          given the boundary word of a polyhex,
          returns the boundary word and base point after
          rotation by some multiple of 60 degrees.
        
 
        - 
          
          boundary_snap.m,
          given the boundary word and starting point of a polyhex,
          translates it to have minimum I and J coordinates of 0.
        
 
        - 
          
          boundary_sort.m,
          "rotates' the boundary word and starting point so that the
          boundary point is minimal.
        
 
        - 
          
          boundary_translate.m,
          given the boundary word and starting point of a polyhex,
          translates it by a requested amount.
        
 
        - 
          
          boundary_to_edge.m,
          given the boundary word of a polyhex,
          converts it to a sequence of nodes that bound it.
        
 
        - 
          
          boundary_to_vertex.m,
          given the boundary word of a polyhex,
          converts it to a vertex list.
        
 
        - 
          ch_to_digit.m
          converts a character to a digit;
        
 
        - 
          
          chvec_lt.m,
          is TRUE if c1
        
- 
          
          ij_to_xy.m,
          given the (i,j) parallelogram coordinates of a node,
          returns the (x,y) Cartesian coordinates.
        
 
        - 
          
          ijk_fill.m,
          given (i,j,k) parallelogram triangle coordinates,
          plots a filled triangle on the current figure.
        
 
        - 
          
          ijk_to_xy.m,
          given (i,j,k) parallelogram triangle coordinates,
          returns the (x,y) Cartesian point coordinates of the 
          nodes that are vertices.
        
 
        - 
          
          is_octave.m,
          is TRUE if Octave is executing.
        
 
        - 
          
          s_escape_tex.m,
          de-escapes TeX escape sequences.
        
 
        - 
          
          tetrahex_name.m,
          given an index between 1 and 7 of a tetrahex, 
          returns the corresponding name.
        
 
        - 
          
          tetrahex_word.m,
          given an index between 1 and 7 of a tetrahex, 
          returns the base point P and boundary word W.
        
 
        - 
          
          vertex_contains_ijk.m,
          given the vertex list of a polyiamond,
          determines if an IJK triangle is contained inside the polyiamond.
        
 
        - 
          
          vertex_contains_point.m,
          given the vertex list of a polyiamond,
          determines if a point is contained inside the polyiamond.
        
 
        - 
          
          vertex_plot.m,
          given the vertex list of a polyiamond,
          plots the polyiamond.
        
 
       
    
    
    
      Last revised on 30 May 2023.