Can somebody give hint or create random distribution& radius of circles?? but there are several types of circles that have specific range
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello ,
I want more than two types of circles in 1 x 1 printed in rectangle graph.
for example, circle 1: minRadius= 0.07, maxRadius= 0.08, with finite number such as 10
circle 2: minRadius2= 0.1, maxRadius2=0.2, numberofcircles= 20
with non overlapping, and random radius and random distribution satisfying ranges,,
please help me.. I will be very appreciated.
Thank you
댓글 수: 3
John D'Errico
2020년 6월 12일
What is the problem? Only you know the desired distribution. It is not meaningful to just state that you want a "random distribution", without specifying the distribution itself anyway.
But just generate randomly placed circles. If they fall inside any other circle, then repeat, until you have enough.
Or start with randomly placed circles or your choosing, ignoring overlaps. Then joggle them around until they are non-overlapping. Good code for this might be to use a repulsive "force", effectively pushing circles that are overlapping, moving them father apart. This could be done iteratively.
But there is no magic formula to generate random non-overlapping circles. Sorry.
Image Analyst
2020년 6월 12일
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!