I have a collection of 2D points S
and I need to test if an input point q
is inside or outside the convex hull of S
.
Since it\
You can do it in Log(h) where h is the amount of point being the already calculated hull points. It is totally false that it is bound by Log(n) although this is what is written in Wikipedia.
You should note that Wikipedia "Convex hull algorithms" is filtered by David Eppstein which you refer. This guy prevent useful information to be added. If that guy would accept to add useful information (new algorithm) and would understand it, he will realize that you can achieve your goal in O(Log h).Please look at the Wikipedia page for the history of the page.
In algorithm Ouellet convex Hull AVL you can use intermediate result (avl tree by quadrant) and look inside directly. You will achieve your goal in the fastest way possible (best performance: Log(h)).
2 important points:
If I could find some time, I will add an interface to my class to check/add new point dynamically. But you can do it right now: get the convex hull intermediate result and use it directly (see the 2 important points) .