Re: [R] multidimensional point.in.polygon??

2009-12-10 Thread Keith Jewell
Hi, Doing some more reading, I think the problem is easier because the hull is convex. Then an algorithm for testing points might be: a) Define the convex hull as a set of planes (simplexes). [as returned by convhulln!!] b) Define one point, i, known to be interior [e.g. mean of all

Re: [R] multidimensional point.in.polygon??

2009-12-10 Thread baptiste auguie
Hi, Regarding your proposed algorithm (looks like it is indeed the correct way to do it), there seem to be a somewhat similar Matlab implementation, http://www.mathworks.com/matlabcentral/fileexchange/10226-inhull It should be possible to port this to R (you might want to check what to do with

Re: [R] multidimensional point.in.polygon??

2009-12-10 Thread Duncan Murdoch
On 10/12/2009 5:15 AM, Keith Jewell wrote: Hi, Doing some more reading, I think the problem is easier because the hull is convex. Then an algorithm for testing points might be: a) Define the convex hull as a set of planes (simplexes). [as returned by convhulln!!] b) Define one point, i,

Re: [R] multidimensional point.in.polygon??

2009-12-04 Thread baptiste auguie
Hi, Yet another one of my very naive ideas on the subject: maybe you can first evaluate the circumscribed and inscribed spheres of the base set of points (maximum and minimum of their distances to the center of gravity). Any points within a distance smaller than the infimum is good, any point