Calculate the areas in a circle

151 Views Asked by At

Short: I want to calculate the areas drawn in this picture:

Areas in Circle

The coordinates P00, P10, P01, P11 and Pdata are given

Long: I am a programmer and want to calculate these areas, but unfortunately I am not able to find a suited formula to calculate the blue area. So I would appreciate any help.

I can calculate the green and red areas.

Thanks for your time and consideration.

(I even don't know what an appropriate title would have been. So I someone finds a better one, please change it.)

1

There are 1 best solutions below

0
On

To solve this problem, as correctly noted in the comments, it is strictly necessary to know the position of the point $P$ on the inner circumference separating the blue and orange areas. In fact, given the other five points, the blue area clearly changes if we move $P$.

There is no way to calculate the position of this point without some additional information. For example, the figure could suggest that $P$ may be the midpoint of the arch between $P01$ and $P00$. If so, this information would be sufficient to determine the position of $P$. Alternatively, you could know a priori the angle $P00-P_{data}-P01$, and so on. In summary, we need some information that unambiguously identifies the position of point $P$.

Once this information is available, you could determine the blue area by calculating the total area of the quadrilater identified by the points $P00, P10, P01, P11$, and then subtracting the red area, the green area, the area of the circular segment identified by points $P00, P01$ in the inner circle, and lastly the orange area.

The area of the quadrilater can be determined in several ways. For example, you can trace the diagonal from $P00$ to $P11$, obtaining two triangles. Then you can calculate the areas of the two triangles by determining the base and the height for both. This is easily obtained using the coordinates of the four points: for instance, choose the diagonal as the common base and calculate its length; then determine its slope $s$, and finally determine the heights of the two triangles by taking into account that their slope is $-1/s$ and that they cross the points $P10$ and $P01$, respectively. Alternatively, you could directly calculate the areas of the two triangles using Heron's formula.

Since you know the red and green areas, it remains to determine the orange area and that of the circular segment identified in the inner circle by $P00, P01$:

  • for the area of the circular segment, its base is the distance between the two points $P00, P01$. Because we know the radius of the inner circle, it is not difficult to obtain the height of the circular segment (simply use Pythagora's theorem). Knowing the radius $r$ and the height $h$ we can get the area of the circular segment using the standard formula $r^2 \arccos(\frac{r-h}{r})-(r-h)\sqrt{2rh-h^2}$;

  • for the orange area, it can be obtained as the difference between the area of the triangle $P00-P_{data}-P$ (use Heron's formula since we can get the length of each side from point coordinates) and that of the circular segment identified in the inner circle by $P, P00$ (use the formula for circular segment area described above, since we know the radius and we can obtain the height again using Pythagora’s theorem).