polar_distribution_​to_hsv

Versión 1.0.0 (1,75 KB) por Duijnhouwer
Summarize a polar distribution with an Hue Saturation Value color triplet
5 descargas
Actualizado 14 mar 2020

Ver licencia

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

Citar como

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

Compatibilidad con la versión de MATLAB
Se creó con R2019b
Compatible con cualquier versión
Compatibilidad con las plataformas
Windows macOS Linux
Etiquetas Añadir etiquetas

Community Treasure Hunt

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

Start Hunting!
Versión Publicado Notas de la versión
1.0.0