I assume that there are only N data points, and a complex shell is defined by M-points.
It should be much easier (and less expensive) to maintain a convex hull than to build it in the first place.
Delete an existing data point
1/ If the data point in not one of the M points defining the convex hull then it won't affect the hull so just remove it. 2/ If it is part of the convex hull then you need to adjust the hull โ more on that below in point 4
Adding a new data point.
3/ If a data point is inside the complex hull then it will not affect the hull.
Here's an easy way to test it out of my head. Create a triangulation of the inside of the body. A complex shell defined using M points can be triangulated into triangles M-2. Then check if the point is in one of the triangles.
4/ if a data point is outside the hull then it will become part of the hull. However, it is only affecting a local area of the hull and it is straightforward to find the new hull in a few steps. If you have already build the hull then it should be clear to you how to adjust a local part of it.
I do not see how any of this service can be O (N)
martino
source share