当前位置:网站首页>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);

边栏推荐
- oracle 控制文件的多路复用
- Parker驱动器维修COMPAX控制器维修CPX0200H
- 华为联机对战如何提升玩家匹配成功几率
- leetcode:1755. Sum of subsequences closest to the target value
- How to prepare for the algorithm interview and answer the algorithm interview questions
- MMAP学习
- Exercise 1 simple training of R language drawing
- @Validated basic parameter verification, grouping parameter verification and nested parameter verification
- Selenium gets the verification code image in DOM
- How to send samples when applying for BS 476-7 display? Is it the same as the display??
猜你喜欢

华为联机对战如何提升玩家匹配成功几率

MMAP

Golang (1) | from environmental preparation to quick start

Clickhouse copy paste multi line SQL statement error
![[case] Application of positioning - Taobao rotation map](/img/2d/c834ce95a2c8e53a20e67fa2e99439.png)
[case] Application of positioning - Taobao rotation map

xlrd常见操作

Incentive mechanism of Ethereum eth

Feng Tang's "spring breeze is not as good as you" digital collection, logged into xirang on July 8!

Kingbasees v8r3 cluster maintenance case -- online addition of standby database management node

張麗俊:穿透不確定性要靠四個“不變”
随机推荐
MMAP
Uni app Bluetooth communication
Opérations de lecture et d'écriture pour easyexcel
校招期间 准备面试算法岗位 该怎么做?
[daily training] 729 My schedule I
面试官:并发编程实战会吗?(线程控制操作详解)
Efficiency difference between row first and column first traversal of mat data types in opencv
JMeter installation under win7
PVC plastic sheets BS 476-6 determination of flame propagation properties
Access Zadig self-test environment outside the cluster based on ingress controller (best practice)
R language learning notes
【日常训练--腾讯精选50】89. 格雷编码(看题解才会的)
EasyExcel的读写操作
GCC9.5离线安装
Environment configuration problem record
MMAP学习
2.2 basic grammar of R language
SQL common syntax records
How to send samples when applying for BS 476-7 display? Is it the same as the display??
Clion configures Visual Studio (MSVC) and JOM multi-core compilation