overlap between between multiple circles using circcirc

Hi all,
I have 10 circles with random center positions but with same radius (but the radius, R= r1:r2). I want to find the intersection points where these circles overlap with eachother at each value of the radius. How can I find these points/ x,y coordinates using the circcirc function inside a for loop?
Thank you.

1 Kommentar

Asatur Khurshudyan
Asatur Khurshudyan am 20 Dez. 2019
Bearbeitet: Asatur Khurshudyan am 20 Dez. 2019
Did you find the answer? I encountered the same problem. This post seem to give an answer.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 24 Mär. 2017

0 Stimmen

Try poly2mask()

5 Kommentare

Thank you. can you explain a little bit more? The poly2mask() content seems hard to understand.
What EXACTLY do you want to know? Let's say that you have 10 circles. Do you want to know
  1. The (x,y) coordinates of where circle #1 overlaps circle #2
  2. The (x,y) coordinates of where circle #1 overlaps circle #3
  3. The (x,y) coordinates of where circle #1 overlaps circle #4
  4. The (x,y) coordinates of where circle #1 overlaps circle #5
  5. The (x,y) coordinates of where circle #1 overlaps circle #6
  6. The (x,y) coordinates of where circle #1 overlaps circle #7
  7. The (x,y) coordinates of where circle #1 overlaps circle #8
  8. The (x,y) coordinates of where circle #1 overlaps circle #9
  9. The (x,y) coordinates of where circle #1 overlaps circle #10
  10. The (x,y) coordinates of where circle #2 overlaps circle #3
  11. The (x,y) coordinates of where circle #2 overlaps circle #4
  12. The (x,y) coordinates of where circle #2 overlaps circle #5
  13. The (x,y) coordinates of where circle #2 overlaps circle #6
and so on - a full factorial of every possible combination of every circle overlapping with every other circle? If so, WHY ? Explain the user case.
Or do you just want the (x,y) coordinates of where the perimeters cross? If so, you can just set the two equations equal to each other and solve for x and y using solve(), or roots() or something like that.
KalMandy
KalMandy am 25 Mär. 2017
Bearbeitet: KalMandy am 25 Mär. 2017
Hi, thanks for the reply. I want to know,
1. The (x,y) coordinates of the intersection point between circle #1 and circle #2
2. The (x,y) coordinates of the intersection point between circle #1 and circle #3
3. The (x,y) coordinates of the intersection point between circle #1 and circle #4.
.
.
.
.
.
10. The (x,y) coordinates of the intersection point between circle #2 and circle #3
11. The (x,y) coordinates of the intersection point between circle #2 and circle #4 etc
I think circcirc function can find these intersection points,
[xout,yout] = circcirc(x1,y1,r1,x2,y2,r2)
currently, my code is as follows,
R=0.05:0.01:0.2;
for z=1:length (R)
for i=1:10
for j=1:10
[xout,yout] = circcirc(xB(i),yB(i),R(z),xB(j),yB(j),R(z));
end
end
end
but with this I cannot get the coordinates for all the cases. I only get the answer for the final case in the for loops.
In some cases there will not be coordinates since the circles do not overlap.
yes i know, my problem is the way i have written [xout,yout] =circcirc... .This only gives the answer for the last case (intersection between circle 9 and 10 with radius r2). maybe it has to be written [xout(i),yout(i)] ?? but this doesnot work too.

Melden Sie sich an, um zu kommentieren.

Kategorien

Gefragt:

am 24 Mär. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by