I am trying to create an image of a circle and divide the circle into known parts (start from the shell of the circle) and give each part (slice) a different color (or gray level).
I am having difficulty how to restrict each slice between two lines and the relevant arc of the circle that completes the slice.
please see the attached picture to understand what i mean.(sorry that the painting wasnot complete - just to help understand the question)
please refer only to the slices in red (ignore the blue one)
thank you very much for your time and help!.
here is the code i found to create the circle:
[columnsInImage rowsInImage] = meshgrid(1:imageSizeX, 1:imageSizeY);
circlePixels = (rowsInImage - centerY).^2 ...
+ (columnsInImage - centerX).^2 <= radius.^2;
colormap([0 0 0; 1 1 1]);
title('Binary image of a circle', 'FontSize', fontSize);
new_im = im2double(circlePixels);