polyiamonds

polyiamonds, an Octave code which considers polyiamonds, simple connected shapes constructed from equilateral triangles connected edgewise.

Languages:

polyiamonds is available in a MATLAB version and an Octave version.

Related Data and Programs:

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:

1. Martin Gardner,
Mathematical Games: On Polyiamonds: Shapes That are Made Out of Equilateral Triangles, Scientific American,
Volume 211, December 1964.
2. T H O'Beirne,
Pentominoes and Hexiamonds,
New Scientist,
Volume 12, pages 379-380, 1961.
3. Torbijn,
Polyiamonds,
Journal of Recreational Mathematics,
Volume 2, pages 216-227, 1969.
4. Solomon Golomb,
Polyominoes: Puzzles, Patterns, Problems, and Packings,
Princeton University Press, 1996,
ISBN: 9780691024448

Source code:

• boolean_to_string.m, returns "True" or "False", given a boolean value.
• boundary_word_is_legal.m, given a string, determines if it is a legal polyiamond boundary word.
• hexiamond_boundary_word.m, given an index between 1 and 12 of a hexiamond, returns the boundary word that traces its boundary by a sequence of unit steps.
• hexiamond_name.m, given an index between 1 and 12 of a hexiamond, returns the corresponding name.
• hexiamond_triangle_ijk.m, given an index between 1 and 12 of a hexiamond, returns the IJK parallelogram triangle coordinates of the 6 triangles that form that shape.
• hexiamond_vertex_ij.m, given an index between 1 and 12 of a hexiamond, returns the IJ parallelogram point coordinates of the N vertices that bound that shape.
• ij_to_xy.m, given the (i,j) parallelogram point coordinates, returns the (x,y) Cartesian coordinates.
• ijk_to_xy.m, given (i,j,k) parallelogram triangle coordinates, returns the (x,y) Cartesian point coordinates of the vertices.
• point_in_polygon.m, determines if a point is inside a polygon.
• polyiamond_free_enumerate.m, enumerates the free polyiamonds.
• polyiamond_grid_plot.m, plots a parallelogram grid divided into equilateral triangles.
• polyiamond_plot.m, plots a polyiamond.
• polyiamond_region_plot.m, plots a region described by its vertices in (I,J) parallelogram point coordinates.
• polyiamond_triangle_print.m, prints the IJK parallelogram triangle coordinates of the triangles that form a polyiamond.
• timestamp.m, prints the YMDHMS date as a timestamp.
• triangle_ijk_fill.m, plots a triangle with given IJK parallelogram triangle coordinates.
• triangle_ijk_in_region.m, determins if a a triangle with given IJK parallelogram triangle coordinates is inside a given region.
• triangle_ijk_to_xy.m, is given a triangle with IJK parallelogram triangle coordinates and returns the (X,Y) Cartestian point coordinates of its vertices.

Last revised on 06 September 2020.