This code gives me a circle with a green center and red annulus. What's the simplest way to create patterns within the annulus, like those shown below in blue and yellow?
xpix = 912;ypix = 1140;rad = 200;RGB = zeros(ypix,xpix,3,'uint8');[x,y] = meshgrid(1:xpix,1:ypix);xc = (xpix+1)/2;yc = (ypix+1)/2;r = sqrt((x-xc).^2+(y-yc).^2);% Center
ii = r <= rad/1.5;RGB(:,:,2)=255*ii;% Annulus
ii = r <= rad & ~ii;RGB(:,:,1)=255*ii;imshow(RGB);imwrite(RGB,'filter.bmp');
Best Answer