Wolfram Research

Polyform Database

Data for some of the most popular polyforms

Examples

Basic Examples

Retrieve the resource:

In[1]:=
ResourceObject["Polyform Database"]
Out[1]=

Retrieve a sample of the default content:

In[2]:=
Short /@ RandomChoice[ResourceData["Polyform Database"]]
Out[2]=

Show the shapes for a polyform:

In[3]:=
Column[{ResourceData["Polyform Database"]["polyomino 2-sided"][
    "PolyformShapes"][[5]], ResourceData["Polyform Database"]["polyiamond 2-sided"][
    "PolyformShapes"][[6]]}]
Out[3]=

The number of polyforms of a given type and order is given in PolyformCounts:

In[4]:=
ResourceData["Polyform Database"][
  "polyiamond 2-sided"]["PolyformCounts"]
Out[4]=

A coordinate form for all polyforms is given. Component cells can have different orientations, so a drawing function is included for each polyform:

In[5]:=
With[{
  cellstan4 = ResourceData["Polyform Database"]["polytan 2-sided"][
     "PolyformCells"][[4]],
  DrawingFunctiontan4 = ResourceData["Polyform Database"]["polytan 2-sided"][
    "PolyformDrawingFunction"]},
 Column[{Row[
    Graphics[{EdgeForm[Black], Yellow, DrawingFunctiontan4 /@ #}, ImageSize -> {70, 40}] & /@ cellstan4], Spacer[10], DrawingFunctiontan4, Spacer[10],
   cellstan4}]]
Out[5]=
In[6]:=

Wolfram Research, "Polyform Database" from the Wolfram Data Repository (2017) https://doi.org/10.24097/wolfram.40377.data

Data Resource History

Source Metadata

Publisher Information