Monday, July 29, 2013

Estimating area of irregular region

Suppose you have an irregular region with continuous boundary like this:
I found that you can estimate the area pretty well by finding points roughly evenly spread around the perimeter xi,yi...
Then using this formula over all the points xi,yi:

Using the computer to count black pixels in the image gave an area of:
and using the formula over the points gave:
Using more points on the perimeter may give closer approximations.

My reasoning in coming up with the formula was first I find xc,yc which is the centroid of the sample points around the perimeter of the curve. Then find the average distance from that centroid to each of the sample points. Then I reason that the area of the irregular region should be roughly equal to a circle of radius that average distance to the centroid. It's as if you somehow reshape the irregular region into a circle in a way that preserves center of mass. Then find the area of the resulting circle. 
I don't know if it always works but it seems likely given how random the shape I started out with was and that it ended up within 1% of the right answer. 

**Three dimensions**

where the list of points could be in some 3 dimensional configuration like so:

The constraint is that it can only calculate volumes of solids topologically equivalent to a sphere...

No comments:

Post a Comment