Skip to contents

This function triangulates the bin centroids using the x and y coordinates provided in the input data frame and returns the triangular object.

Usage

tri_bin_centroids(hex_df, x, y)

Arguments

hex_df

The tibble containing the bin centroids.

x

The name of the column that contains x coordinates of bin centroids.

y

The name of the column that contains y coordinates of bin centroids.

Value

A triangular object representing the triangulated bin centroids.

Examples

df_bin_centroids <- s_curve_obj$s_curve_umap_model_obj$df_bin_centroids
tri_bin_centroids(hex_df = df_bin_centroids, x = "c_x", y = "c_y")
#> Delaunay triangulation, node and triangle indices:
#> triangle: nodes (a,b,c), neighbour triangles [i,j,k] 
#> 1: (1,2,4), [2,7,0]
#> 2: (5,4,2), [1,3,8]
#> 3: (3,5,2), [2,0,4]
#> 4: (6,5,3), [3,14,6]
#> 5: (11,5,8), [6,13,9]
#> 6: (8,5,6), [4,11,5]
#> 7: (10,1,4), [1,8,15]
#> 8: (5,10,4), [7,2,9]
#> 9: (11,10,5), [8,5,17]
#> 10: (8,9,12), [20,13,11]
#> 11: (9,8,6), [6,12,10]
#> 12: (6,7,9), [21,11,14]
#> 13: (8,12,11), [18,5,10]
#> 14: (6,3,7), [0,12,4]
#> 15: (13,1,10), [7,16,0]
#> 16: (14,13,10), [15,17,0]
#> 17: (14,10,11), [9,19,16]
#> 18: (11,12,15), [20,19,13]
#> 19: (11,15,14), [0,17,18]
#> 20: (15,9,12), [10,18,21]
#> 21: (15,7,9), [12,20,0]
#> boundary nodes:  1 2 3 7 15 7 15