How to find a common area between three graphs in same plot

2 views (last 30 days)
I am trying to find a common are between three circular arcs starting from different center points with same radius covering different angular distances as shown in the figure
Code to plot these graphs is
clear all
radius = 100;
xCenter1 = 0;
yCenter1 = 0;
theta1= linspace(90,95,50);
xCenter2 = 20;
yCenter2 = 0;
theta2 = linspace(40,45,50);
xCenter3 = 40;
yCenter3 = 0;
plot(x1,y1,'b-', 'LineWidth', 2)
hold on
plot(x2,y2,'b-', 'LineWidth', 2)
hold on
plot(x3,y3,'b-', 'LineWidth', 2);
hold on
plot(intersect([pgon1,pgon2]),'EdgeColor','none','FaceColor', 'c')
% axis([0 radius+5 0 radius+5])
axis equal
grid on
function [x,y]=req_out(xCenter,yCenter,theta,radius,radius1)
x1=radius1*cosd(min(theta))+ xCenter;
y1=radius1*sind(min(theta))+ yCenter;
x2= radius * cosd(theta) + xCenter;
y2= radius * sind(theta) + yCenter;
x3=radius1*cosd(max(theta))+ xCenter;
y3=radius1*sind(max(theta))+ yCenter;
Please some one guide me through this...

Accepted Answer

darova on 25 May 2021
Do you have polyxpoly?
Try intersections if not

More Answers (0)


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!