Skip to contents

This function generates edge information from a given triangular object, including the coordinates of the vertices and the from-to relationships between the vertices.

Usage

generate_edge_info(triangular_object)

Arguments

triangular_object

The triangular object from which to generate edge information.

Value

A data frame containing the edge information, including the from-to relationships and the corresponding x and y coordinates.

Examples

num_bins_x <- 4
shape_value <- 1.833091
hexbin_data_object <- extract_hexbin_centroids(nldr_df = s_curve_noise_umap,
num_bins = num_bins_x, shape_val = shape_value)
df_bin_centroids <- hexbin_data_object$hexdf_data
tr1_object <- triangulate_bin_centroids(df_bin_centroids, x, y)
generate_edge_info(triangular_object = tr1_object)
#> # A tibble: 35 × 6
#>     from    to x_from y_from   x_to  y_to
#>    <dbl> <dbl>  <dbl>  <dbl>  <dbl> <dbl>
#>  1     1     2  -3.27  -5.74 -1.84  -5.74
#>  2     1     3  -3.27  -5.74 -2.55  -4.38
#>  3     2     4  -1.84  -5.74 -1.12  -4.38
#>  4     3     6  -2.55  -4.38 -1.84  -3.01
#>  5     3     4  -2.55  -4.38 -1.12  -4.38
#>  6     4     7  -1.12  -4.38 -0.407 -3.01
#>  7     5     6  -3.27  -3.01 -1.84  -3.01
#>  8     5     8  -3.27  -3.01 -1.12  -1.65
#>  9     5    11  -3.27  -3.01  0.308  1.09
#> 10     5    13  -3.27  -3.01  0.308  3.82
#> # ℹ 25 more rows