Triangular Lattice
Build a triangular lattice with periodic boundary conditions in the x direction and open boundary conditions in the y direction:
using CairoMakie
using LatticeMaker
L = TriangularLattice(7, 5; periodic=(true, false))Lattice{2}(UnitCell{2}(((1.0, 0.0), (0.5, 0.8660254037844386)), [(0.0, 0.0)], [(1, (1, 0), 1), (1, (0, 1), 1), (1, (-1, 1), 1)]), (7, 5), (true, false))Get the edges of the lattice:
edges(L)91-element Vector{Vector{Int64}}:
[1, 6]
[1, 2]
[1, 32]
[6, 11]
[6, 7]
[2, 6]
[11, 16]
[11, 12]
[7, 11]
[16, 21]
⋮
[34, 35]
[30, 34]
[5, 10]
[10, 15]
[15, 20]
[20, 25]
[25, 30]
[30, 35]
[5, 35]Plot the lattice:
plot_lattice(L)