% Draw d random dots in each of c concentric rings

% Set up figure window
close all; figure;
axis equal off
axis([-c c -c c])
hold on

% Get user inputs
c= input('How many concentric rings? ');
d= input('How many dots? ');

% Put dots in the area between circles with radii rRing and (rRing-1)
for rRing= 1:c
% Draw d dots
for count= 1:d
theta= randDouble(0, 360);
radius= randDouble(rRing-1, rRing);
[x, y]= polar2xy(radius, theta);
drawColorDot(x, y, rem(rRing,2));
end
% Pause after each ring to animate plot
pause(1);
end

hold off