install.packages("BiocManager") 
BiocManager::install("HilbertCurve")

library(HilbertCurve)
library(circlize)
set.seed(123)


for(i in 1:512) {
  peano = HilbertCurve(1, 512, level = 4, reference = TRUE, arrow = FALSE)
  hc_points(peano, x1 = i, np = NULL, pch = 16, size = unit(3, "mm"))
}