polar_distribution_​to_hsv

Summarize a polar distribution with an Hue Saturation Value color triplet
5 download
Aggiornato 14 mar 2020

Visualizza la licenza

polar_distribution_to_hsv - summarize a polar distribution with an hsv color triplet

HSV=polar_distribution_to_hsv(THETA,RHO) where THETA is an array of values on the circle [0,360> in degrees and RHO the corresponding intensities between 0 and 1 returns HSV, a three value array corresponding to Hue, Saturation, and Value (intensity). Hue is direction of the mean intensity on the cirle, Saturation the length of that "mean"-vector, and Value corresponds to the mean RHO.

EXAMPLE:
theta = 0:359;
rho = zeros(size(theta));
rho(1:45)=1;
ax=cla;
hold(ax,'on');
ph=patch(ax,[min(theta) max(theta) max(theta) min(theta)],[min(rho) min(rho) max(rho) max(rho)],[0.5 0.5 0.5]);
lh=plot(ax,theta,rho,'k','LineWidth',2);
xlabel(ax,'Theta');
ylabel(ax,'Rho');
axis tight;
hold on
while true
rho=circshift(rho,3);
hsv=polar_distribution_to_hsv(theta,rho);
hsv(3)=1; % force full intensity
rgb=hsv2rgb(hsv);
ph.FaceColor=rgb;
lh.YData=rho;
lh.Color=1-rgb;
pause(0.02);
end

See also: hsv2rgb

Cita come

Duijnhouwer (2024). polar_distribution_to_hsv (https://www.mathworks.com/matlabcentral/fileexchange/74527-polar_distribution_to_hsv), MATLAB Central File Exchange. Recuperato .

Compatibilità della release di MATLAB
Creato con R2019b
Compatibile con qualsiasi release
Compatibilità della piattaforma
Windows macOS Linux
Tag Aggiungi tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Versione Pubblicato Note della release
1.0.0