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

Asatur Khurshudyan
Asatur Khurshudyan 2019년 12월 20일
편집: Asatur Khurshudyan 2019년 12월 20일
Did you find the answer? I encountered the same problem. This post seem to give an answer.

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2017년 3월 24일

0 개 추천

Try poly2mask()

댓글 수: 5

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 2017년 3월 25일
편집: KalMandy 2017년 3월 25일
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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Data Type Conversion에 대해 자세히 알아보기

질문:

2017년 3월 24일

편집:

2019년 12월 20일

Community Treasure Hunt

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

Start Hunting!

Translated by