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/1bc148438570283f28ce379edd93cf86d3c74c5b09dbf38d89de4f02eb3f7732.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/4399ff71f7aafea0c0aae6d4ed6db18acaa8cfbff099fa21dece3b4632a64f21.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/fb4913db03b87a6060943fed48275ba3acf89a45fb9d7f8c0cea24bc5f42b92e.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/48eca55375fa92b9c6a8856ebec6a093ae7bbb4c427084294805a8d2b8d5a4d2.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/84fb2f26849499a3797d8421d0866219ea06f2cfc3485a5b40e0b6983ac8a864.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/b98c0d36b08020b2d8e88b614d95115f015f839fc8f438934cf079d65b68e924.png

Infinitesimally flexible, but continuously rigid realization.

TP = frameworks.ThreePrism('parallel')
TP.plot()
TP.is_inf_rigid()
False
../../_images/460e9fbf3d0838d44584fe1e4c4678500a03aca9f34b6d43ca27f9a796472dc9.png

Continuously flexible realization.

TP = frameworks.ThreePrism('flexible')
TP.plot()
TP.is_inf_rigid()
False
../../_images/b0b1060c92f0ffeaae56ed9f07f311eddaf4ea4fc49ec6634fea242f69087dce.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/4a1f0aac7ebdf21f607649f20c44d8ee3fadffed0ac42c24bb5be4ad75bd999b.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/bb1c7e0faa1da1402610f3e09bc13aeb8dc65195adb061dc017c6ba056aafa3c.png
frameworks.K33plusEdge().plot()
../../_images/1bc3279d60cc6f1ed6c0310b639e71e798a39e4f47663287c726aa325b984c18.png
frameworks.ThreePrismPlusEdge().plot()
../../_images/c2ddaefafd3c2f897b659c7846da14fe962ecc64a4bf0bba671aa7970cd2b382.png
frameworks.Frustum(3).plot()
../../_images/20e6d34d6ad1eae8a4a5034b1359296f28c3dfb6971d9f31dc2a470350bfa04f.png
frameworks.CnSymmetricFourRegular(10).plot()
../../_images/426ed042481f8aa857652aa39395535b41855c10a0aaeb07881031df64c62350.png
frameworks.CnSymmetricWithFixedVertex(8).plot()
../../_images/ef50c064e52684334a1e24275ee8c7d362ca3eb9c61d7eb28ea3788b5284d7c0.png