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
import hypertiling.graphics.svg as svg
[2]:
p, q, n = 3, 7, 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, 4, 5, 6, 11, 12, 13, 14, 15, 16, 17, 18, 19]
[0, 38, 6, 8, 7, 10, 11, 39, 40, 41, 42, 43, 44, 45, 46]
New layers can be added anytime
[4]:
T.add_layer()
[11]:
tiling_colors = [1.0]
tiling_svg = svg.make_svg(T, unitcircle=True, cmap="YlOrBr")
svg.draw_svg(tiling_svg)
svg.write_svg("dummy.svg", tiling_svg)
[ ]:
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, "", fontsize=15-4*l, ha="center", va="center")
[ ]: