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/d2b431cda911db18ead3c71e6b43ba44c90f07307fa7ddcf75961290db9a7534.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/7d8bf0b033b2b1a5fb7d2027275d172e489028b48e6a3d5f36004c545c19e253.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/ca8b315e84d2a6f7220588d56079b1dc8a9fdec02c8543b0b34eb6161d0ceeba.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/2e7d3f0632d1e6f6425100f90a5dd882ec2c8a9465adcbff225ef71b6093130c.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/c150a96695631ed4440cfd93f5cf0ed05ccaab384d09f38f2361ce0be90d8e2f.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/8b6f5d410c0123324102e8b9e254457892889e0b4e2051824c4cd7736969a95a.png

Infinitesimally flexible, but continuously rigid realization.

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

Continuously flexible realization.

TP = frameworks.ThreePrism('flexible')
TP.plot()
TP.is_inf_rigid()
False
../../_images/a6304e430564d84500c97d30d8c69bd70dbf9d080ef4603a261feb720148ec6f.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/5dce885ccf2959246fcb0df2b7050b0c344d034bcfe0afccb6cd3fe91f86ffdb.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/e173a3fb9558d4d916183f9e9728c89afc7a8928f8b220a685829e2c94ea94fb.png
frameworks.K33plusEdge().plot()
../../_images/4fc071de7ab68b8a62d54d9af70773b5b569f3bb938d9d3795d5d214e6636198.png
frameworks.ThreePrismPlusEdge().plot()
../../_images/19c716b026773ff1113cf66671a0133d6754f806efbf9312a413ef1644816786.png
frameworks.Frustum(3).plot()
../../_images/52f89cf77d1691a789e93ed3b5a7418cee86e7c8361859f9517c0feb5cd57e7f.png
frameworks.CnSymmetricFourRegular(10).plot()
../../_images/977a531415b6f805a51a8c11b28ead954861c158a118ac0639c11feddc25a1e7.png
frameworks.CnSymmetricWithFixedVertex(8).plot()
../../_images/1104d135ad6753fe794618806a7d70a1ec1435b33e94083722923e76d8ef9cec.png