Static Rotational Graph (SRG) kernel

The SRG kernel is designed to provide an extensible tiling, where neighbour/adjacency relations are generated during construction, rendering a subsequent computation of cell neighbours obsolete

[1]:
from hypertiling import HyperbolicTiling
from hypertiling.graphics.plot import plot_tiling
import matplotlib.pyplot as plt
[2]:
p, q, n = 7, 3, 2
T = HyperbolicTiling(p, q, n, kernel="SRG", center="vertex")
T.add_layer()

Access neighbours

[3]:
print(T.get_nbrs(1))
print(T.get_nbrs(9))
[0, 2, 7, 8, 9, 10, 11]
[32, 1, 33, 34, 8, 10, 31]

New layers can be added anytime

[4]:
T.add_layer()
[5]:
print(T.get_nbrs(17))
[3, 4, 16, 18, 52, 54, 55]
[10]:
plot_tiling(T, dpi=220)
for i in range(len(T)):
    z = T.get_center(i)
    l = T.get_layer(i)
    t = plt.text(z.real, z.imag, str(i), fontsize=15-4*l, ha="center", va="center")
../_images/examples_srg-kernel_9_0.png