I want to calculate the white area enclosed by four circles (as indicated by the arrow). Spacing between the center of circles 'd' and radius is 'r'.
x1^2+y1^2=r^2 and also that (x−d)^2+(y−d)^2=r^2
-
$\begingroup$ What are the equations of the two other circles? $\endgroup$– cvgmtJun 9, 2021 at 2:18
2 Answers
shift = 3/2 ;
c1 = ImplicitRegion[(x + 1/2*shift)^2 + (y + 1/2*shift)^2 <= 1, {x, y}] ;
c2 = ImplicitRegion[(x - 1/2*shift)^2 + (y + 1/2*shift)^2 <= 1, {x, y}] ;
c3 = ImplicitRegion[(x + 1/2*shift)^2 + (y - 1/2*shift)^2 <= 1, {x, y}] ;
c4 = ImplicitRegion[(x - 1/2*shift)^2 + (y - 1/2*shift)^2 <= 1, {x, y}] ;
r1 = RegionUnion[c1, c2, c3, c4] ;
r2 = Rectangle[{-1/2*shift, -1/2*shift}, {1/2*shift, 1/2*shift}] ;
RegionPlot[{r1, r2}]
Area[r2] - Area[RegionIntersection[r1, r2]]
(* 9/4+1/4 (-3 Sqrt[7]-8 ArcSin[3/4]+8 ArcSin[Sqrt[7]/4]) *)
One should not use a computer if the calculation can be done easily with paper and pencil.
Consider a circle segment:
the area of this circle segment is:
alpha = 2 ArcCos[d/2/r];
circsegarea= r^2/2 (alpha-Sin[alpha]);
Now if we subtract from the square d^2 a full circle we subtract too much, namely 4 circle segments. Therefore, the searched for area is:
area[d_, r_] = d^2 - r^2 Pi + 4 circsegarea
The example with r=1 and d=1.5 gives:
area[1.5, 1]
(* 0.0150309 *)