Square Lattice
Build a square lattice with periodic boundary conditions in both directions:
using CairoMakie
using LatticeMaker
L = SquareLattice(7, 5; periodic = (true, true))Lattice{2}(UnitCell{2}(((1.0, 0.0), (0.0, 1.0)), [(0.0, 0.0)], [(1, (0, 1), 1), (1, (1, 0), 1)]), (7, 5), (true, true))Get the edges of the lattice:
edges(L)70-element Vector{Vector{Int64}}:
[1, 2]
[1, 6]
[6, 7]
[6, 11]
[11, 12]
[11, 16]
[16, 17]
[16, 21]
[21, 22]
[21, 26]
⋮
[15, 20]
[16, 20]
[20, 25]
[21, 25]
[25, 30]
[26, 30]
[30, 35]
[31, 35]
[5, 35]Plot the lattice:
plot_lattice(L)