Algorithm to compute the area of a convex set in 2 dimensions

If all you have is a membership oracle, you can run the marching squares algorithm on it to extract a reasonably accurate polygonal approximation, and then calculate the area of that using any area-calculating algorithm you can find online. The good thing about the marching squares is that I think there are implementations whose outputs are Delaunay triangulations.

It is difficult to evaluate the complexity of such a process with relation to $c$ and $\epsilon$, but all I can say is that it depends on the step of the grid you use to run the marching squares algorithm (since the area-computing algorithm doesn't depend on those variables). It may be even harder than that, since for example a square only needs a super rough estimate but something that looks like a piecewise segment (ie very thin) would need an extremely low error range.


We agreed in comments that we should know a point of $K$. (Let it be the origin.) But it is not enough to solve the problem. If $K$ is extremely long and superthin, it is really hard to find any other point of $K$. (For example $K$ may be a rectangle $0.000\,001\sqrt{\epsilon} \times 1\,000\,000\,000\sqrt{\epsilon}$, rotated by some angle.) Therefore we need to have at least two points.

If these points are too close to each other then the problem obviously remains. So we need to have at least two “not-too-close” points. If area of $K$ is at least $\epsilon$ then there are two points at distance at least $2\sqrt{\frac{\epsilon}{\pi}}$. (And otherwise answer $0$ would be acceptable.) We can't require two points with greater distance, because $K$ may be a circle of radius $\sqrt{\frac{\epsilon}{\pi}}$.

Ok, suppose we have two points at distance at least $d = 2\sqrt{\frac{\epsilon}{\pi}}$. And $K$ is the same extremely long and superthin rectangle. We still have no evident way to find an approximation of area of $K$. Really an intersection of $K$ and a line $\ell$ containing given points may have as small length as $d$. On the other hand an intersection of $K$ and a line that is perpendicular to $\ell$ may be almost as short as width of $K$. Therefore we again need to find the direction of superthin $K$ to get a good approximation of the area of $K$. So we need either some significant number of operations (I will estimate later) to find this direction or three points that are vertices of a triangle of big enough area.