当前位置:网站首页>Drawing HSV color wheel with MATLAB
Drawing HSV color wheel with MATLAB
2022-07-05 21:40:00 【slandarer】
% Generate grid
tList=linspace(0,2.*pi,300);
rList=linspace(0,1,100);
[theta,R]=meshgrid(tList,rList);
% The angle and radius are converted into coordinates
X=cos(theta+pi).*R;
Y=sin(theta).*R;
Z=zeros(size(X));
% structure hvs surface (nx3) And converted to rgb surface
thetaV=theta(:);RV=R(:);
hsvList=[thetaV./2./pi,ones(size(RV)),RV];
rgbList=hsv2rgb(hsvList);
% Turn it into a matrix triplet
C=zeros([size(X),3]);
C(:,:,1)=reshape(rgbList(:,1),size(X));
C(:,:,2)=reshape(rgbList(:,2),size(X));
C(:,:,3)=reshape(rgbList(:,3),size(X));
% surf mapping
surf(X,Y,Z,'EdgeColor','none','CData',C)
axis([-1,1,-1,1]);axis equal
view(0,90);

边栏推荐
- 使用Aspect制作全局异常处理类
- Parker驱动器维修COMPAX控制器维修CPX0200H
- MySQL InnoDB Architecture Principle
- Pointer parameter passing vs reference parameter passing vs value parameter passing
- Which securities company is better and which platform is safer for stock account opening
- MQ----activeMq
- Huawei fast game failed to call the login interface, and returned error code -1
- Chapter 05_ Storage engine
- Teach yourself to train pytorch model to Caffe (III)
- leetcode:1139. The largest square bounded by 1
猜你喜欢

MySQL 千万数据量深分页优化, 拒绝线上故障!

PIP install beatifulsoup4 installation failed

Interviewer: will concurrent programming practice meet? (detailed explanation of thread control operation)

How can Huawei online match improve the success rate of player matching

Opérations de lecture et d'écriture pour easyexcel

Emotional analysis of wechat chat records on Valentine's day based on Text Mining

Making global exception handling classes with aspect

Arcgis\qgis no plug-in loading (no offset) mapbox HD image map

资深电感厂家告诉你电感什么情况会有噪音电感噪音是比较常见的一种电感故障情况,如果使用的电感出现了噪音大家也不用着急,只需要准确查找分析出什么何原因,其实还是有具体的方法来解决的。作为一家拥有18年品牌

Analysis and test of ModbusRTU communication protocol
随机推荐
PIP install beatifulsoup4 installation failed
Access Zadig self-test environment outside the cluster based on ingress controller (best practice)
Reading and writing operations of easyexcel
Parker驱动器维修COMPAX控制器维修CPX0200H
KingbaseES V8R3集群维护案例之---在线添加备库管理节点
Aitm2-0002 12s or 60s vertical combustion test
Defect detection - Halcon surface scratch detection
What should I do to prepare for the interview algorithm position during school recruitment?
Selenium gets the verification code image in DOM
Problems encountered in office--
kingbaseES V8R3数据安全案例之---审计记录清除案例
R language learning notes
An exception occurred in Huawei game multimedia calling the room switching method internal system error Reason:90000017
Environment configuration problem record
PostGIS installation geographic information extension
Teach yourself to train pytorch model to Caffe (I)
MATLAB | App Designer·我用MATLAB制作了一款LATEX公式实时编辑器
R language [data management]
SQL common syntax records
uni-app 蓝牙通信