This function generates all possible centroids in the hexagonal grid.
Value
A tibble contains hexIDs, x and y coordinates (hexID, c_x, c_y respectively) of all hexagon bin centroids.
Examples
scurve_umap_scaled_obj <- s_curve_obj$s_curve_umap_scaled_obj
lim1 <- scurve_umap_scaled_obj$lim1
lim2 <- scurve_umap_scaled_obj$lim2
r2 <- diff(lim2)/diff(lim1)
gen_centroids(bin1 = 4, r2 = r2, q = 0.1)
#> # A tibble: 20 × 3
#> hexID c_x c_y
#> <int> <dbl> <dbl>
#> 1 1 -0.1 -0.0885
#> 2 2 0.210 -0.0885
#> 3 3 0.520 -0.0885
#> 4 4 0.830 -0.0885
#> 5 5 0.0549 0.180
#> 6 6 0.365 0.180
#> 7 7 0.675 0.180
#> 8 8 0.985 0.180
#> 9 9 -0.1 0.448
#> 10 10 0.210 0.448
#> 11 11 0.520 0.448
#> 12 12 0.830 0.448
#> 13 13 0.0549 0.717
#> 14 14 0.365 0.717
#> 15 15 0.675 0.717
#> 16 16 0.985 0.717
#> 17 17 -0.1 0.985
#> 18 18 0.210 0.985
#> 19 19 0.520 0.985
#> 20 20 0.830 0.985