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

gen_edges(tri_object)

Arguments

tri_object

The triangular object from which to generate edge information.

Value

A tibble that contains the edge information, including the from-to relationships and the corresponding x and y coordinates.

Examples

tr1_object <- s_curve_obj$s_curve_umap_model_tr1_object
gen_edges(tri_object = tr1_object)
#> # A tibble: 35 × 6
#>     from    to  x_from  y_from   x_to    y_to
#>    <int> <int>   <dbl>   <dbl>  <dbl>   <dbl>
#>  1     1     2 -0.1    -0.0938 0.227  -0.0938
#>  2     4     5  0.0634  0.189  0.390   0.189 
#>  3     3     5  0.554  -0.0938 0.390   0.189 
#>  4     5     6  0.390   0.189  0.717   0.189 
#>  5     5    11  0.390   0.189  0.390   0.755 
#>  6     5     8  0.390   0.189  0.554   0.472 
#>  7     1    10 -0.1    -0.0938 0.0634  0.755 
#>  8     5    10  0.390   0.189  0.0634  0.755 
#>  9    10    11  0.0634  0.755  0.390   0.755 
#> 10     8     9  0.554   0.472  0.880   0.472 
#> # ℹ 25 more rows