arc-ops: Boolean arc operations, and also the distance between two...

arc operationsR Documentation

Boolean arc operations, and also the distance between two collections of arcs.

Description

Perform Boolean operations on collections of arcs in the circle. Arcs are always considered to be closed, i.e. to contain their endpoints.

Usage

complementaryarcs( arcmat )
arcsintersection( arcmat1, arcmat2 )
arcsunion( arcmat1, arcmat2 )
arcssymmdiff( arcmat1, arcmat2 )

arcsdistance( arcmat1, arcmat2 )

Arguments

arcmat

an Nx2 matrix with an arc definition in each row; so the total number of arcs is N. The 1st number in the row is the center of the arc, and the 2nd number is the length of the arc; both in radians.
The length can be 0 or 2\pi, defining the empty arc and the full circle respectively. For these improper arcs, there must be only 1 row, and the center is ignored.

The given arcs must be strictly disjoint.

arcmat1, arcmat2

2 matrices that define 2 collections of arcs, as in the previous argument. The number of arcs in each collection are not required to be equal.

Value

complementaryarcs() returns a matrix of the same size, which represents the closure of the complement of the union of the given arcs, as a subset of the circle. The given arcs must be strictly disjoint; if not the the function logs and error and returns NULL.

arcsintersection(), arcsunion(), and arcssymmdiff() return the intersection, union, and symmetric difference of the 2 given arc collections, respectively.

arcsdistance() returns the distance between two collections of arcs. This distance is the sum of the arc lengths of the symmetric difference.

See Also

plotarcs(), disjointarcs()


polarzonoid documentation built on June 13, 2025, 9:08 a.m.