当前位置:网站首页>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);
边栏推荐
- MMAP学习
- Cold violence -- another perspective of objective function setting
- EBS Oracle 11g 克隆步骤(单节点)
- Comprehensive optimization of event R & D workflow | Erda version 2.2 comes as "7"
- The primary key is set after the table is created, but auto increment is not set
- oracle 控制文件的多路复用
- Evolution of zhenai microservice underlying framework from open source component encapsulation to self-development
- Two ways to realize video recording based on avfoundation
- leetcode:1139. The largest square bounded by 1
- Get JS of the previous day (timestamp conversion)
猜你喜欢
EasyExcel的读写操作
Cold violence -- another perspective of objective function setting
Pytoch practice -- MNIST dataset handwritten digit recognition
Simple interest mode - evil Chinese style
Ethereum ETH的奖励机制
让开发效率飞速提升的跨端方案
Incentive mechanism of Ethereum eth
Access Zadig self-test environment outside the cluster based on ingress controller (best practice)
2022-07-03-cka- latest feedback from fans
matlab绘制hsv色轮图
随机推荐
MySQL deep paging optimization with tens of millions of data, and online failure is rejected!
Parker driver maintenance COMPAX controller maintenance cpx0200h
2.2 basic grammar of R language
让开发效率飞速提升的跨端方案
SQL common syntax records
Oracle HugePages没有被使用导致服务器很卡的解决方法
2.2.3 output of documents
基于 Ingress Controller 在集群外访问 Zadig 自测环境(最佳实践)
What should I do to prepare for the interview algorithm position during school recruitment?
uni-app 蓝牙通信
Haas506 2.0 development tutorial - Alibaba cloud OTA - PAC firmware upgrade (only supports versions above 2.2)
JS common method encapsulation
Four components of logger
Realize the function of verifying whether the user has completed login when browsing the page
The primary key is set after the table is created, but auto increment is not set
Li Kou ----- the maximum profit of operating Ferris wheel
MySQL 千万数据量深分页优化, 拒绝线上故障!
@Validated基础参数校验、分组参数验证和嵌套参数验证
QML reported an error expected token ";", expected a qualified name ID
KingbaseES V8R3集群维护案例之---在线添加备库管理节点