For Intersecting Circles, how to remove overlapping arcs for 3 or more circles?
Mostrar comentarios más antiguos
In the attached image if you project the red lined plane to z=0 (2D) is there a way to plot the circles with chords shown, and arcs removed in MATLAB (as well as an extension to N circles)?

I have a solution posted from a previous question (2 circles) which will be shown here (with some minor changes):
clear all
clc
m = 100; % Number of points on circle
x_max = 50; % Uppermost x location of circle center
y_max = 50; % Uppermost y location of circle center
theta = 0:2*pi/m:2*pi; % Evaluated angles for circle
i = 1;
k = 2; %%%%%%%%%%%
rad(i) = 15*rand; % Save circle radii to array
x_pos(i) = x_max*rand; % Save circle xi-positions to array
y_pos(i) = y_max*rand; % Save circle yi-positions to array
rad(k) = 15*rand; % Save circle radii to array
x_pos(k) = x_max*rand; % Save circle xk-positions to array
y_pos(k) = y_max*rand; % Save circle yk-positions to array
Xk=x_pos(k)+rad(k)*cos(theta);
Yk=y_pos(k)+rad(k)*sin(theta);
Xi=x_pos(i)+rad(i)*cos(theta);
Yi=y_pos(i)+rad(i)*sin(theta);
dC1 = sqrt((Xi-x_pos(k)).^2+(Yi-y_pos(k)).^2)>=rad(k);
dC2 = sqrt((Xk-x_pos(i)).^2+(Yk-y_pos(i)).^2)>=rad(i);
plot(Xk(dC2.'),Yk(dC2.'),'m',Xi(dC1.'),Yi(dC1.'),'c');
axis([0 100 0 100]);
hold on
axis equal
Or maybe there is a way to have N circles fit the requirements above with a carefully restricted Voronoi/Delaunay plot?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Detection and Tracking en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!