When I use the alphahull library for determining whether a point belongs to a alpha-convex hull or not (inahull), I'm getting a FALSE for points that are clearly inside the alpha convex hull. I've tried different ways of handling the data but it seems that inahull doesn't work properly (or I don't know how to use it ;) )
library(alphahull)
data<-read.table("f2",h=T)
plot(x=x$alpha,y=x$beta, log="y")
Now, I select a set of points for creating a subspace in the plot
sp<-locator(30, type='p', pch=20)
sp
$x
[1] 16.91776 24.41393 36.14421 46.46116 43.34893 27.61219 16.99911
$y
[1] 31.74403 55.32414 68.87334 30.98970 15.31316 11.20075 15.14894
hull<-ahull(sp,alpha=1000)
Now, I add them to the plot just to check:
plot(hull, add=T)
(So far it looks good) Now, if I check that these points are inside the shape (which are clearly inside):
inahull(hull, c(30,40))
FALSE
The data that I'm using can be found in this link: https://drive.google.com/file/d/0B8gPXQL4u-b_c2RxNHNGcE5TOVk/edit?usp=sharing
A problem using alphahull was also reported here: Row ordering for polygons
Thanks for your time and help!