This function generates the coordinates of hexagons after passing hexagonal centroids.
Value
A tibble contains polygon id, x and y coordinates (hex_poly_id, x, and y respectively) of hexagons.
Examples
width <- s_curve_obj$s_curve_umap_hb_obj$a1
all_centroids_df <- s_curve_obj$s_curve_umap_hb_obj$centroids
gen_hex_coord(centroids_df = all_centroids_df, a1 = width)
#> # A tibble: 120 × 3
#> hex_poly_id x y
#> <int> <dbl> <dbl>
#> 1 1 -0.1 0.0949
#> 2 1 -0.263 0.000514
#> 3 1 -0.263 -0.188
#> 4 1 -0.1 -0.283
#> 5 1 0.0634 -0.188
#> 6 1 0.0634 0.000514
#> 7 2 0.227 0.0949
#> 8 2 0.0634 0.000514
#> 9 2 0.0634 -0.188
#> 10 2 0.227 -0.283
#> # ℹ 110 more rows