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/c9bde5ae4aed9f0a76f417fcd07e7435eba258861442098db25edfc83d40b179.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/0c0e9011ebb7157a9cbb2c6b7807021ad815dcf3f89ae401f5e326f6d7e8e919.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/29092fe49991a6123f28c0bdb98342477facacbe6c4bccfa9f3482b99d6b5c5d.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/b5bc333487a3391167d1f277d5785adc4d61d2c884ccfe75a903ef9fe556fbee.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/e64f03aee9cb92b0a0a2f361c6be7bbe85260fd09fda10ad377e72f5db69a36f.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/6f930918b30e81b0794a5dcbb29ce3fc999ca3e05a86a1c3c1ff6ec811b2bb43.png

Infinitesimally flexible, but continuously rigid realization.

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

Continuously flexible realization.

TP = frameworks.ThreePrism('flexible')
TP.plot()
TP.is_inf_rigid()
False
../../_images/083b47924fe53f038b9bc034b683213215591c411f54afe257bbfabf22f769e7.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/33024bc68851f7531dfd741871c18a801066ee7851ca0bc253fd5c7c95595f99.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/21eb570a141bf0723a57674b6e797b2108dff7a01218bf435ad3bef854e85fc8.png
frameworks.K33plusEdge().plot()
../../_images/7c92f9240867c731507d9188f6a28359a2333abfd48472d61addd81a280a9283.png
frameworks.ThreePrismPlusEdge().plot()
../../_images/a2536bb833c056efc55d1b1d2a3f2add36a255f5787c496f998f6a5ca9faafce.png
frameworks.Frustum(3).plot()
../../_images/9996c8e56bc19a36a722906e0a74cd1c46a7ac99be7e0631ab7bd3f50a0ef497.png
frameworks.CnSymmetricFourRegular(10).plot()
../../_images/cf0ff6ba7ee7dbdb05fc3bbee5c9e339329c923562bbbc9c27436afef751e8c2.png
frameworks.CnSymmetricWithFixedVertex(8).plot()
../../_images/57ab845cd823387bc99a2f4cbd3d081c4e66afe38f534c524d9d43a368e69832.png