dotsInCircles - for r= 1:c % Draw d dots for count= 1:d...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
function dotsInCircles(d, c) % Draw d random dots in each of c concentric rings % Set up figure window close all; figure(1); axis('equal'); axis([-c c -c c]) hold on % Put dots in the area between circles with radii r and (r-1)
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: for r= 1:c % Draw d dots for count= 1:d theta= randDouble(0, 360); radius= randDouble(r-1, r); [x, y]= polar2xy(radius, theta); drawColorDot(x, y, rem(r,2)); pause(0.01); end end hold off...
View Full Document

Ask a homework question - tutors are online