R Under development (unstable) (2024-01-07 r85787 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(RTriangle) > p <- pslg(P=rbind(c(0, 0), c(0, 1), c(0.5, 0.5), c(1, 1), c(1, 0)), + S=rbind(c(1, 2), c(2, 3), c(3, 4), c(4, 5), c(5, 1))) > tp <- triangulate(p) > print(tp) $P [,1] [,2] [1,] 0.0 0.0 [2,] 0.0 1.0 [3,] 0.5 0.5 [4,] 1.0 1.0 [5,] 1.0 0.0 $PB [,1] [1,] 1 [2,] 1 [3,] 1 [4,] 1 [5,] 1 $PA [1,] [2,] [3,] [4,] [5,] $T [,1] [,2] [,3] [1,] 2 1 3 [2,] 3 5 4 [3,] 5 3 1 $S [,1] [,2] [1,] 1 2 [2,] 3 2 [3,] 4 3 [4,] 4 5 [5,] 5 1 $SB [,1] [1,] 1 [2,] 1 [3,] 1 [4,] 1 [5,] 1 $E [,1] [,2] [1,] 2 1 [2,] 1 3 [3,] 3 2 [4,] 3 5 [5,] 5 4 [6,] 4 3 [7,] 1 5 $EB [,1] [1,] 1 [2,] 0 [3,] 1 [4,] 0 [5,] 1 [6,] 1 [7,] 1 $VP [,1] [,2] [1,] 0.0 0.5 [2,] 1.0 0.5 [3,] 0.5 0.0 $VE [,1] [,2] [1,] 1 -1 [2,] 1 3 [3,] 1 -1 [4,] 2 3 [5,] 2 -1 [6,] 2 -1 [7,] 3 -1 $VN [,1] [,2] [1,] -1.0 0.0 [2,] 0.0 0.0 [3,] 0.5 0.5 $VA [1,] [2,] [3,] $NB [,1] [,2] [,3] [1,] 3 -1 -1 [2,] -1 -1 3 [3,] 1 -1 2 attr(,"class") [1] "triangulation" > > proc.time() user system elapsed 0.10 0.04 0.15