# make two disjoint arcs
arcmat = matrix( c(pi/4,pi/2, pi,pi/4), 2, 2, byrow=TRUE ) ; arcmat
## [,1] [,2]
## [1,] 0.7853982 1.5707963
## [2,] 3.1415927 0.7853982
plotarcs( arcmat )
# map to boundary of the zonoid
b = boundaryfromarcs( arcmat ) ; b
## x1 y1 x2 y2 L
## 0.2346331 1.0000000 0.7071068 1.0000000 2.3561945
# map b back to arcs, and compare with original
arcsdistance( arcmat, arcsfromboundary(b) )
## [1] 2.220446e-16
# so the round trip returns to original pair of arcs, up to numerical precision
Run the code above in your browser using DataLab