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, 3, 8, 9, 10, 11]
[1, 8, 10, 31, 32, 33, 34]

New layers can be added anytime

[4]:
T.add_layer()
[8]:
print(T.get_nbrs(17))
[3, 4, 16, 19, 53, 54, 55]
[9]:
plot_tiling(T, dpi=100)
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=18-3*l, ha="center", va="center")
../_images/examples_srg-kernel_9_0.png