A package for generating and analyzing Aztec diamonds
To generate an order-n Aztec diamond, simply call diamond(n)
julia> D = diamond(10)
10-order Tiling{Matrix{AztecDiamonds.Edge}}
🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃🬦🬓🬦🬓🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃🬦🬓🬉🬄🬉🬄🬦🬓🬇🬋🬋🬃
🬇🬋🬋🬃🬦🬓🬇🬋🬋🬃🬉🬄🬦🬓🬦🬓🬉🬄🬦🬓🬇🬋🬋🬃
🬦🬓🬇🬋🬋🬃🬉🬄🬦🬓🬇🬋🬋🬃🬉🬄🬉🬄🬦🬓🬉🬄🬦🬓🬇🬋🬋🬃
🬦🬓🬉🬄🬦🬓🬇🬋🬋🬃🬉🬄🬦🬓🬦🬓🬇🬋🬋🬃🬉🬄🬦🬓🬉🬄🬦🬓🬦🬓🬦🬓
🬦🬓🬉🬄🬦🬓🬉🬄🬦🬓🬦🬓🬦🬓🬉🬄🬉🬄🬦🬓🬦🬓🬦🬓🬉🬄🬦🬓🬉🬄🬉🬄🬉🬄🬦🬓
🬦🬓🬉🬄🬦🬓🬉🬄🬦🬓🬉🬄🬉🬄🬉🬄🬇🬋🬋🬃🬉🬄🬉🬄🬉🬄🬦🬓🬉🬄🬇🬋🬋🬃🬦🬓🬉🬄🬦🬓
🬉🬄🬦🬓🬉🬄🬦🬓🬉🬄🬦🬓🬇🬋🬋🬃🬦🬓🬇🬋🬋🬃🬇🬋🬋🬃🬉🬄🬇🬋🬋🬃🬦🬓🬉🬄🬦🬓🬉🬄
🬉🬄🬦🬓🬉🬄🬦🬓🬉🬄🬦🬓🬦🬓🬉🬄🬦🬓🬦🬓🬦🬓🬦🬓🬇🬋🬋🬃🬦🬓🬉🬄🬦🬓🬉🬄
🬉🬄🬦🬓🬉🬄🬦🬓🬉🬄🬉🬄🬦🬓🬉🬄🬉🬄🬉🬄🬉🬄🬇🬋🬋🬃🬉🬄🬦🬓🬉🬄
🬉🬄🬦🬓🬉🬄🬇🬋🬋🬃🬉🬄🬇🬋🬋🬃🬇🬋🬋🬃🬦🬓🬇🬋🬋🬃🬉🬄
🬉🬄🬦🬓🬦🬓🬦🬓🬇🬋🬋🬃🬇🬋🬋🬃🬦🬓🬉🬄🬇🬋🬋🬃
🬉🬄🬉🬄🬉🬄🬦🬓🬦🬓🬇🬋🬋🬃🬉🬄🬇🬋🬋🬃
🬇🬋🬋🬃🬉🬄🬉🬄🬇🬋🬋🬃🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃🬇🬋🬋🬃
🬇🬋🬋🬃🬇🬋🬋🬃
🬇🬋🬋🬃
It is recommended that you use an interactive enviroment like Pluto, VS Code or IJulia to be able to view the generated diamonds in all their glory. Alternatively, you can also view them in a separate window using the ImageView package as follows:
julia> using ImageView
julia> imshow(AztecDiamonds.to_img(D))
[...]
It is possible to take advantage of GPU acceleration via KernelAbstractions.jl on supported backends, e.g. CUDA:
julia> using CUDA
julia> ka_diamond(200, CuArray)
[...]
You can extract the DR-path separating the northern arctic region from the rest of the diamond using the dr_path
function.
julia> dr_path(D)
21-element OffsetArray(::Vector{Float64}, -10:10) with eltype Float64 with indices -10:10:
-0.5
0.5
1.5
2.5
3.5
4.5
5.5
4.5
5.5
6.5
5.5
5.5
5.5
4.5
3.5
3.5
3.5
2.5
1.5
0.5
-0.5