Hilbert conversion, distance to coordinates
hilbertd2xy(n, d)
n | Size (must be a 2^k value, such as 4,8,16,32) |
---|---|
d | A vector of values to be converted to coordinates (starts with 0) |
Tibble with columns x and y
hilbertd2xy(64,31)#> # A tibble: 1 x 2 #> x y #> <dbl> <dbl> #> 1 3 4