How to distribute lot of rings evenly over an image?

1 view (last 30 days)
I want to put lot of rings distributed over an image. The ring sizes should be the same and should be distributed evenly. Can someone give me some tips. The reason for this is i want to do the difference of gaussian on an image but like in this picture below with two concentric circles which is a ring.

Accepted Answer

Image Analyst
Image Analyst on 10 Jan 2022
Something like
numCircles = 20;
xCenter = xMax * rand(numCircles, 1);
yCenter = yMax * rand(numCircles, 1);
radius = 30 * ones(numCircles, 1);
viscircles([xCenter, yCenter], radius);

More Answers (0)

Community Treasure Hunt

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

Start Hunting!