Database of frameworks

This notebook can be downloaded here.

There are several predefined frameworks in pyrigi.frameworkDB.

# The import will work if the package was installed using pip.
import pyrigi.frameworkDB as frameworks

Complete frameworks

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

frameworks.Complete(2)
Framework in 2-dimensional space consisting of:
Graph with vertices [0, 1] and edges [[0, 1]]
Realization {0:(0, 0), 1:(1, 0)}
frameworks.Complete(3, d=1)
Framework in 1-dimensional space consisting of:
Graph with vertices [0, 1, 2] and edges [[0, 1], [0, 2], [1, 2]]
Realization {0:(0,), 1:(1,), 2:(2,)}
frameworks.Complete(4, d=3)
Framework in 3-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:(0, 0, 0), 1:(1, 0, 0), 2:(0, 1, 0), 3:(0, 0, 1)}
K4 = frameworks.Complete(4, d=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/2f325a9a7489a84401d1b14e0d9ea8484343b1cbb47ed86ea2f78ccb801c4d53.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, d=3)
except ValueError as e:
    print(e)
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()
../../_images/96b77ba123c9170f49ae86f2670a76400d4adae6871f81626cc89ece079ff49a.png
True

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()
../../_images/7405fee84aa73d7aec1c4c73ca2482fe18a100ca14d848b22a7926a4bcc5a85c.png
True

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/c0a1d0a4ce42d7b870473e5e9fd71e754829d98c509b22be507d244d9b30bd28.png
frameworks.Cycle(5, d=1)
Framework in 1-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:(0,), 1:(1,), 2:(2,), 3:(3,), 4:(4,)}
frameworks.Cycle(5, d=4)
Framework in 4-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:(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/e969f924177eb5e918d5b57d7452040dfa8cf887ee3e793a2b3024658cafdc68.png
frameworks.Path(5, d=1)
Framework in 1-dimensional space consisting of:
Graph with vertices [0, 1, 2, 3, 4] and edges [[0, 1], [1, 2], [2, 3], [3, 4]]
Realization {0:(0,), 1:(1,), 2:(2,), 3:(3,), 4:(4,)}
frameworks.Path(5, d=4)
Framework in 4-dimensional space consisting of:
Graph with vertices [0, 1, 2, 3, 4] and edges [[0, 1], [1, 2], [2, 3], [3, 4]]
Realization {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()
../../_images/659f0fb3ec13031f47a4fe86d08179282a7d3e15b9d6b7e47b4962c295b7222e.png
True

Infinitesimally flexible, but continuously rigid realization.

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

Continuously flexible realization.

TP = frameworks.ThreePrism('flexible')
TP.plot()
TP.is_inf_rigid()
../../_images/35b15ee8b5ed72b374f201184cdc00549cd41b0ba979ce872c9f6ff1005bf896.png
False

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/d748426d5f36aba500b987be397e9a42eddb0dbaea6150d9f6e8b9451a3d29cd.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/fe104b8d726847268be6ef18254d48042847e2b8795bfc5ab8792b3493705bdc.png
frameworks.K33plusEdge().plot()
../../_images/20f445d4f57ce3e15af0efd0bff8c457e8a27cc621d2bb07a8661ad64445b857.png
frameworks.ThreePrismPlusEdge().plot()
../../_images/770dc11301cbf7aa8a132f8af8fab44977538974e4e231804c729cf8b74620a8.png
frameworks.Frustum(3).plot()
../../_images/a26c2421d7a695216d66ce221987636538ef5676f51d2b6ab8b1806757e9234d.png
frameworks.CnSymmetricFourRegular(10).plot()
../../_images/e36869ec6f113568ed10a7a5010680ce114589cfb9d2d0cc458a07ba5d12052a.png
frameworks.CnSymmetricFourRegularWithFixedVertex(8).plot()
../../_images/e618fff77f6272d167e683cc0d9d2ddbdcb8f30cb27126fe48a1494e19bf11c6.png