Hilbert conversion, distance to coordinates

hilbertd2xy(n, d)

Arguments

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)

Value

Tibble with columns x and y

Examples

hilbertd2xy(64,31)
#> # A tibble: 1 x 2 #> x y #> <dbl> <dbl> #> 1 3 4