Database of frameworks

This notebook can be downloaded here.

There are several predefined frameworks in pyrigi.frameworkDB.

import pyrigi.frameworkDB as frameworks

Complete frameworks

Complete() returns \(d\)-dimensional complete frameworks.

frameworks.Complete(2)
Framework(Graph.from_vertices_and_edges([0, 1], [(0, 1)]), {0: ['0', '0'], 1: ['1', '0']})
frameworks.Complete(3, dim=1)
Framework(Graph.from_vertices_and_edges([0, 1, 2], [(0, 1), (0, 2), (1, 2)]), {0: ['0'], 1: ['1'], 2: ['2']})
frameworks.Complete(4, dim=3)
Framework(Graph.from_vertices_and_edges([0, 1, 2, 3], [(0, 1), (0, 2), (0, 3), (1, 2), (1, 3), (2, 3)]), {0: ['0', '0', '0'], 1: ['1', '0', '0'], 2: ['0', '1', '0'], 3: ['0', '0', '1']})
K4 = frameworks.Complete(4, dim=2)
print(K4)
K4.plot()
Framework in 2-dimensional space consisting of:
Graph with vertices [0, 1, 2, 3] and edges [[0, 1], [0, 2], [0, 3], [1, 2], [1, 3], [2, 3]]
Realization {0:(1, 0), 1:(0, 1), 2:(-1, 0), 3:(0, -1)}
../../_images/170b65763f4b93db2112f3d42b14200e026b563ade37069a68d315bb69aaecf2.png

Currently, for \(d\geq 3\), the number of vertices must be at most \(d+1\) so the graph can be realized as a simplex.

try:
    frameworks.Complete(5, dim=3)
except ValueError as error:
    print(error)
The number of vertices n has to be at most d+1, or d must be 1 or 2 (now (d, n) = (3, 5).

Complete bipartite frameworks

CompleteBipartite() returns 2-dimensional complete bipartite frameworks.

K33 = frameworks.CompleteBipartite(3, 3)
K33.plot()
K33.is_inf_rigid()
True
../../_images/f1c064fb850e708fd77a11437bb5c601cdfd1fe150738a1e048a178bc4b275ab.png

The first construction of a flexible realization by Dixon places one part on the \(x\)-axis and the other part on the \(y\)-axis.

K33_dixonI = frameworks.CompleteBipartite(3, 3, 'dixonI')
K33_dixonI.plot()
K33_dixonI.is_inf_flexible()
True
../../_images/8263adbd63b60040af99f94f97f037780b56755c02ee6b1134d6de5f7198e70d.png

Cycle frameworks

Cycle() returns \(d\)-dimensional frameworks on cycle graphs. The restriction on the number of vertices w.r.t. the dimension is the same as for complete frameworks.

C5 = frameworks.Cycle(5)
print(C5)
C5.plot()
Framework in 2-dimensional space consisting of:
Graph with vertices [0, 1, 2, 3, 4] and edges [[0, 1], [0, 4], [1, 2], [2, 3], [3, 4]]
Realization {0:(1, 0), 1:(-1/4 + sqrt(5)/4, sqrt(sqrt(5)/8 + 5/8)), 2:(-sqrt(5)/4 - 1/4, sqrt(5/8 - sqrt(5)/8)), 3:(-sqrt(5)/4 - 1/4, -sqrt(5/8 - sqrt(5)/8)), 4:(-1/4 + sqrt(5)/4, -sqrt(sqrt(5)/8 + 5/8))}
../../_images/2213b3c5c318aee9faadcba7f4a9f4d7587409b533f07f104e7933c384f11265.png
frameworks.Cycle(5, dim=1)
Framework(Graph.from_vertices_and_edges([0, 1, 2, 3, 4], [(0, 1), (0, 4), (1, 2), (2, 3), (3, 4)]), {0: ['0'], 1: ['1'], 2: ['2'], 3: ['3'], 4: ['4']})
frameworks.Cycle(5, dim=4)
Framework(Graph.from_vertices_and_edges([0, 1, 2, 3, 4], [(0, 1), (0, 4), (1, 2), (2, 3), (3, 4)]), {0: ['0', '0', '0', '0'], 1: ['1', '0', '0', '0'], 2: ['0', '1', '0', '0'], 3: ['0', '0', '1', '0'], 4: ['0', '0', '0', '1']})

Path frameworks

Path() returns \(d\)-dimensional frameworks on path graphs. The restriction on the number of vertices w.r.t. the dimension is the same as for complete frameworks.

P5 = frameworks.Path(5)
print(P5)
P5.plot()
Framework in 2-dimensional space consisting of:
Graph with vertices [0, 1, 2, 3, 4] and edges [[0, 1], [1, 2], [2, 3], [3, 4]]
Realization {0:(1, 0), 1:(-1/4 + sqrt(5)/4, sqrt(sqrt(5)/8 + 5/8)), 2:(-sqrt(5)/4 - 1/4, sqrt(5/8 - sqrt(5)/8)), 3:(-sqrt(5)/4 - 1/4, -sqrt(5/8 - sqrt(5)/8)), 4:(-1/4 + sqrt(5)/4, -sqrt(sqrt(5)/8 + 5/8))}
../../_images/19c3bde57705b31a2fb8ff6536d1ee3b3d391355eeb9d3ed090f289a9e722079.png
frameworks.Path(5, dim=1)
Framework(Graph.from_vertices_and_edges([0, 1, 2, 3, 4], [(0, 1), (1, 2), (2, 3), (3, 4)]), {0: ['0'], 1: ['1'], 2: ['2'], 3: ['3'], 4: ['4']})
frameworks.Path(5, dim=4)
Framework(Graph.from_vertices_and_edges([0, 1, 2, 3, 4], [(0, 1), (1, 2), (2, 3), (3, 4)]), {0: ['0', '0', '0', '0'], 1: ['1', '0', '0', '0'], 2: ['0', '1', '0', '0'], 3: ['0', '0', '1', '0'], 4: ['0', '0', '0', '1']})

3-prism

A general realization of 3-prism.

TP = frameworks.ThreePrism()
TP.plot()
TP.is_inf_rigid()
True
../../_images/b9fb18a7c4ff184f47286191d526c20b9839d8cbd98c14ee834447139f9ab8e1.png

Infinitesimally flexible, but continuously rigid realization.

TP = frameworks.ThreePrism('parallel')
TP.plot()
TP.is_inf_rigid()
False
../../_images/7a2b85f7203414962f4140b5c039a17a938784891cb05bbb6cc3dbcea5ca99b5.png

Continuously flexible realization.

TP = frameworks.ThreePrism('flexible')
TP.plot()
TP.is_inf_rigid()
False
../../_images/59eb113e3a6a8911a7eed1b3daac3abb45f2638505f10045d709633c5eafef62.png

Further frameworks

Diamond = frameworks.Diamond()
print(Diamond)
Diamond.plot()
Framework in 2-dimensional space consisting of:
Graph with vertices [0, 1, 2, 3] and edges [[0, 1], [0, 2], [0, 3], [1, 2], [2, 3]]
Realization {0:(0, 0), 1:(1, 0), 2:(1, 1), 3:(0, 1)}
../../_images/5ad761ad8e00e8d2659404e5cd6340610f0078676b5f08184489b04e0cb83ef2.png
Square = frameworks.Square()
print(Square)
Square.plot()
Framework in 2-dimensional space consisting of:
Graph with vertices [0, 1, 2, 3] and edges [[0, 1], [0, 3], [1, 2], [2, 3]]
Realization {0:(0, 0), 1:(1, 0), 2:(1, 1), 3:(0, 1)}
../../_images/555b595647c2779cc7c6f5cdae3d3a6a0850a0128c99fcb5cb29ea24b6f03cf5.png
frameworks.K33plusEdge().plot()
../../_images/902f120294f7ba7dca7371985e588b9902ef946a1710a7f6a6d1dba030a69cf5.png
frameworks.ThreePrismPlusEdge().plot()
../../_images/1285fe2b005b997e3cadd909d8dde0b484e40d0be800588bb2d9a72b1a8f56d5.png
frameworks.Frustum(3).plot()
../../_images/46296b708ba407e46d43967062d2cc3671db6c328099a96fe523f656626f91ec.png
frameworks.CnSymmetricFourRegular(10).plot()
../../_images/9e76c31fcdc7f42b9758c37878ad16e79c9eca49bedab5cae729c2b346241e42.png
frameworks.CnSymmetricWithFixedVertex(8).plot()
../../_images/35e315a8c53a1e291927dddc72f7b1d2bde301075a056e56376e849b105b5507.png