What is the best way, elegant in Matlab programming, to find the outline boundary, i.e. the [x,y] coordinate, of the three intersecting circles as shown below?
do you have an example of a matlab code to solve this problem?
the plot is generated using the following codes,
R = 1;
r = 0.5;
m = 37;
for ii=1:m
theta(ii) = (2*pi/m)*ii;
end
X = R.*cos(theta);
Y = R.*sin(theta);
x1 = R + r.*cos(theta);
y1 = r.*sin(theta);
x2 = -R - r.*cos(theta);
y2 = r.*sin(theta);
x3 = r.*cos(theta);
y3 = R+ r.*sin(theta);

The figure has reflective symmetry across the $x-$axis, the $y-$axis and the line $x = y$ We can analyze $\frac 18$ the region and multiply.
the circle $x^2 + y^2 =1$ intesects the circle $(x-1)^2 + y^2 = \frac 14$
$x^2 + y^2 = 1\\ x^2 + y^2 - 2x + 1 = \frac 14\\ 2x = \frac 74\\ x = \frac 78\\ y = \sqrt {1-(\frac 78)^2}$
The partial circumference of the small circle is from the x-axis to the point of intersection:
$\frac 12 \arccos -\frac 14$
The partial circumference of the large cirlce from the point of intesection to the line $x= y$:
$\frac \pi4 - \arccos \frac 78$
$2\pi - 8\arccos \frac 78 + 4\arccos -\frac 14$