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!