Description Usage Arguments Details Value Author(s) Examples
Given a set of vertices of a polygon, determine which test points lie inside the polygon.
1 | region.inside(test, vertices)
|
test |
a two-column matrix of points to be tested. |
vertices |
a two-column matrix of vertices of the polygon. The last vertex should be the same as the first. |
The algorithm works by checking whether the angle from the test point to the polygon changes by 2pi over one circuit.
A logical vector taking value TRUE
where the point lies inside the
polygon and FALSE
otherwise.
Peter Perkins (peter@caliban.ucsd.edu) on S-news: http://math.yorku.ca/Who/Faculty/Monette/S-news/0474.html
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.