How to create a circle with segments of specific colors
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I am trying to create an image of a circle with inner and outer radius, that is divided radially in segments. Then I would like to fill the segments with four solid colors (r b y m) that will repeat around the segments with theta. Ideally each different collor segment will subtend different angle.
rInner = 180; % inner radius of the colour ring
rOuter = 200; % outer radius of the colour ring
ncols = 20; % number of colour segments
[x, y] = meshgrid(-rOuter:1:rOuter);
[theta, rho] = cart2pol(x, y);
Here is an example the circle, it should close but it was bad choice of the angles.
2 Kommentare
Image Analyst
am 3 Mär. 2019
Bearbeitet: Image Analyst
am 3 Mär. 2019
And you can't adapt my answer below to do that?
Antworten (1)
Siehe auch
Kategorien
Mehr zu Colormaps finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!