Tangram

In the Tangram puzzle, a shape is created by arranging 7 possible polygons, one adjacent to the other. These polygons are: 2 large right triangles, 1 medium right triangle, 2 small right triangles, a square, and a parallelogram. The goal is usually to recreate a given shape using these polygons. There are over 6500 documented such problems in classic 19th century texts.

This algorithm generates a Tangram shape by randomly placing the polygons one adjacent to the other. The shape can be generated either in the classic 7-polygon scheme, or in other, non-classic schemes with a random variety of polygons.

The Tangram puzzle has a few emergent properties which I personally find fascinating. One of particular interest is convexity. A shape is convex if for any two points inside it, the line segment connecting them stays within the boundary. It was proven that for the classic scheme there are only 13 such shapes. A second property of interest is the genus of the shape, or the number of "holes" it has. And finally, a third interesting property is the resemblance to various animals - a swan, a lion, or a frog.

twitter
linktr
nahumfarchi at gmail dot com