Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mesh.diff

Difference, union and intersection operation on two regions


Description

Compute the signed distances from points p to a region defined by the difference, union or intersection of regions specified by the functions regionA and regionB. regionA and regionB must accept a matrix p with 2 columns as their first argument, and must return a vector of length nrow(p) containing the signed distances of the supplied points in p to their respective regions.

Usage

mesh.diff(p, regionA, regionB, ...)

Arguments

p

A matrix with 2 columns (3 in mesh.dsphere), each row representing a point in the plane.

regionA

vectorized function describing region A in the union / intersection / difference

regionB

vectorized function describing region B in the union / intersection / difference

...

additional arguments passed to regionA and regionB

Value

A vector of length nrow(p) containing the signed distances to the boundary of the region.

Author(s)

Raoul Grasman; translated from original Matlab sources of Per-Olof Persson.

See Also


geometry

Mesh Generation and Surface Tessellation

v0.4.5
GPL (>= 3)
Authors
Jean-Romain Roussel [cph, ctb] (wrote tsearch function with QuadTrees), C. B. Barber [cph], Kai Habel [cph, aut], Raoul Grasman [cph, aut], Robert B. Gramacy [cph, aut], Pavlo Mozharovskyi [cph, aut], David C. Sterratt [cph, aut, cre] (<https://orcid.org/0000-0001-9092-9099>)
Initial release
2019-12-02

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.