How to find a common area between three graphs in same plot
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Ijjada Hari
el 25 de Mayo de 2021
Respondida: darova
el 25 de Mayo de 2021
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
clc
clear all
radius = 100;
radius1=0:2:100;
xCenter1 = 0;
yCenter1 = 0;
theta1= linspace(90,95,50);
xCenter2 = 20;
yCenter2 = 0;
theta2 = linspace(40,45,50);
xCenter3 = 40;
yCenter3 = 0;
theta3=linspace(135,140,50);
[x1,y1]=req_out(xCenter1,yCenter1,theta1,radius,radius1);
[x2,y2]=req_out(xCenter2,yCenter2,theta2,radius,radius1);
[x3,y3]=req_out(xCenter3,yCenter3,theta3,radius,radius1);
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;
x=[x1,x2,x3];
y=[y1,y2,y3];
end
Please some one guide me through this...
0 comentarios
Respuesta aceptada
Más respuestas (0)
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!