boundary_word_square
    
    
    
      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.
    
    
      The symbols might be 'u', 'd', 'r', and 'l', indicating that the boundary is
      to be drawn by a succession of movements of unit length, that are up, down, 
      right or left.  
    
    
      In some boundary word schemes, 8 symbols are required, to allow for movement
      in the N, S, E, W, NE, SE, NW, and SW directions.
    
    
      In image processing, boundary words are known as "chain codes".
    
    
      Licensing:
    
    
      The information on this web page is distributed under the MIT license.
    
    
      Languages:
    
    
      boundary_word_square is available in
      a MATLAB version and
      an Octave version and
      a Python version.
    
    
      Related Data and Programs:
    
    
      
      boundary_word_square_test
    
    
      
      pariomino,
      an Octave code which
      considers pariominoes, which are polyominoes with a checkerboard parity.
    
    
      
      polyomino_parity,
      an Octave code which
      uses parity considerations to determine whether a given set of
      polyominoes can tile a specified region.
    
    
      
      polyominoes,
      an Octave code which
      defines, solves, and plots a variety of polyomino tiling problems,
      which are solved by a direct algebraic approach involving the
      reduced row echelon form (RREF) of a specific matrix, instead of the
      more typical brute-force or backtracking methods.
    
    
      Reference:
    
    
      
        - 
          George Bell,
          The dynamics of spinning polyominoes,
          Gathering for Gardner, G4G13.
         
        - 
          Srecko Briek, Gilbert Labelle, Ariane Lacasse,
          Algorithms for polyominoes based on the discrete Green theorem,
          Discrete Applied Mathematics,
          Volume 147, pages 187-205, 2005.
         
      
    
    
      Source Code:
    
    
      
        - 
          boundary_word_area.m,
          returns the area of a polyomino defined by a boundary word.
        
 
        - 
          boundary_word_boundary.m,
          returns the boundary of a polyomino defined by a boundary word.
        
 
        - 
          boundary_word_boundary_plot.m,
          plots the boundary of a polyomino defined by a boundary word.
        
 
        - 
          boundary_word_centroid.m,
          returns the centroid of a polyomino defined by a boundary word.
        
 
        - 
          boundary_word_check.m,
          checks that a boundary word is valid.
        
 
        - 
          boundary_word_is_convex.m,
          is TRUE if the boundary word describes a convex shape.
        
 
        - 
          boundary_word_moment.m,
          determines the moment of inertia of a polyomino defined by a boundary word.
        
 
        - 
          boundary_word_parity.m,
          determines the parity of a polyomino defined by a boundary word.
        
 
        - 
          boundary_word_perimeter.m,
          determines the perimeter of a polyomino defined by a boundary word.
        
 
        - 
          boundary_word_plot.m,
          plots a polyomino defined by a boundary word.
        
 
        - 
          boundary_word_range.m,
          determines the range of a polyomino defined by a boundary word.
        
 
        - 
          
          boundary_word_representative.m,
          returns the representative for a boundary word, the lexically first
          member of the equivalence class.
        
 
        - 
          boundary_word_sense.m,
          determines the sense of a polyomino defined by a boundary word,
          which is +1 for a counterclockwise boundary, -1 otherwise.
        
 
        - 
          boundary_word_transform.m,
          returns the boundary word of a polyomino after reflections and
          rotations.
        
 
        - 
          chvec_eq.m,
          is TRUE if c1=c2, where c1 and c2 are character strings.
        
 
        - 
          chvec_lt.m,
          is TRUE if c1
        
- 
          chvec_reduce.m,
          reduces a string of repeated characters to a single occurrence.
        
 
        - 
          is_octave.m,
          is TRUE if Octave is executing.
        
 
        - 
          pentomino_index.m,
          returns the symbol of any of the 12 pentominoes.
        
 
        - 
          pentomino_moment.m,
          returns the moment of inertia of any of the 12 pentominoes.
        
 
        - 
          pentomino_symbol.m,
          returns the symbol of the i-th pentomino.
        
 
        - 
          pentomino_to_boundary_word.m,
          returns the boundary_word describing any of the 12 pentominoes.
        
 
        - 
          polygon_contains_point.m,
          is TRUE if a point is contained in a polygon.
        
 
        - 
          r8mat_print.m,
          prints an R8MAT.
        
 
        - 
          r8mat_print_some.m,
          prints some of an R8MAT.
        
 
        - 
          r8vec2_print.m,
          prints a pair of R8VEC's side by side.
        
 
       
    
    
    
      Last modified on 15 June 2021.