[R] Checking a point behind two polygons

CZ cxzhang at ualr.edu
Wed Aug 25 22:08:42 CEST 2010


Hi,

I am working on a problem of checking whether a point is behind two convex
hulls.  By 'behind', I mean a point which is outside of two convex hulls
can't reach either of these two hulls without reaching the other.  

My idea is to find the segments between the point and the vertices of a hull
first. And then check whether there is any intersection between the segments
and the edges of the other hull.  If for all the edges to be checked, there
is no intersection point found outside of the edges --> the point is said to
be behind that hull. 

Basically, I am doing line-line intersection. I know if I use the line-line
intersection checking, I will have to deal with lots of edges and segments. 
Besides, the line-line intersection checking may not be working...I wonder
someone knows a simply way and more accurate way to check it,
e.g.line-polygon intersection.   Thank you.  
-- 
View this message in context: http://r.789695.n4.nabble.com/Checking-a-point-behind-two-polygons-tp2338823p2338823.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list