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/4c8ca2240e5825676644be4922d6868ed52668041fc7c7db2c408f413910140f.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/ef68e738a979e8d61969fbe39d5be2f6dc8a01b8df4661fe094c19771eef3db5.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/7cc516d5946d79b90fd637b2ffb7a6116047dcebbc9b29031b13a150c18a4caf.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/95c82f03de802ada64e557e1daa973976bee1aa6aaaba804f19d4a7cf76d1a01.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/12c026b111e52ffcd1465baff4c0d5315e5e90f9a1e921c0ba497f6e549e93f2.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/372ae2fbc6fa43dde8a2f24f11d5f646c4e3a9b9b2e8760f3055f769ee0cab69.png

Infinitesimally flexible, but continuously rigid realization.

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

Continuously flexible realization.

TP = frameworks.ThreePrism('flexible')
TP.plot()
TP.is_inf_rigid()
False
../../_images/04bc5deb6f8d08f662c18b0ec3106215c221785475a0b407d9b2a53c197d62c0.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/6d71f8885fe1b033aa685a3c488c9f27f7af370b3242d5c134fdd9489e8739e9.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/d12462c6bff083e2a88b80d9d80ba64acfd27a7750328b57ddd9c2972b58a868.png
frameworks.K33plusEdge().plot()
../../_images/632337a2d389cbc9b781a31462e5ff95fbfadcd4a62b09e7ee1f8a054b92245b.png
frameworks.ThreePrismPlusEdge().plot()
../../_images/a4318dc7fe71631e7ffb2d381181e5b40d58c02d9da74760249e765cb3ec5add.png
frameworks.Frustum(3).plot()
../../_images/4d9ede2b0b4f458b7aa5d2543f59ae89fa5a83eaa57477b37f863cf4e44c337b.png
frameworks.CnSymmetricFourRegular(10).plot()
../../_images/f2b0118fb95f56bb434d8a0c8fa10aa61700c2e4091b52d9aa2a0757641e047c.png
frameworks.CnSymmetricWithFixedVertex(8).plot()
../../_images/57778169dd658b0aa9531fef6be29c4b3cb5ce6675f4dac8c28a4e6ace6d5905.png