当前位置:网站首页>Drawing with MATLAB (2) -- color ring
Drawing with MATLAB (2) -- color ring
2022-06-26 08:47:00 【NBb-666】
function [] = colorwheel(theta)
h = figure(1);
set(h,'outerposition',[300 300 200 200],'color','w')
x1 = 0;
y1 = 0;
t = (0:.02:2)*pi;
r1 = 0:.02:0.3;
r2 = .3:.02:0.8;
r3 = 0.8:.02:1;
r1 = r1*1;
xp1 = x1+cos(t)'*r1;
yp1 = y1+sin(t)'*r1;
xp2 = x1+cos(t)'*r2;
yp2 = y1+sin(t)'*r2;
xp3 = x1+cos(t)'*r3;
yp3 = y1+sin(t)'*r3;
hold on
%pcolor(x,y,t'*(r1==r1));
surface(xp1,yp1,t'*(r1 == r1),'FaceAlpha',0);
surface(xp2,yp2,t'*(r2 == r2));
colormap(hsv(256))
shading interp
surface(xp3,yp3,t'*(r3 == r3),'FaceColor',[0 0 0]);
axis equal off
view(theta,90)
set(gca,'position',[0 0 1 1])
end
Input parameters theta Controls the clockwise rotation angle of the color ring .
Command line window input
colorwheel(90);
Available 
边栏推荐
猜你喜欢

Relationship extraction -- casrel

Intra class data member initialization of static const and static constexpr

Bezier curve learning

Design based on STM32 works: multi-functional atmosphere lamp, wireless control ws2812 of mobile app, MCU wireless upgrade program
GHUnit: Unit Testing Objective-C for the iPhone

MPC learning notes (I): push MPC formula manually

Structure diagram of target detection network

Convex optimization of quadruped

STM32 project design: temperature, humidity and air quality alarm, sharing source code and PCB

Fabrication of modulation and demodulation circuit
随机推荐
nn. Modulelist and nn Sequential
How to Use Instruments in Xcode
Assembly led on
Formula understanding in quadruped control
Embedded Software Engineer (6-15k) written examination interview experience sharing (fresh graduates)
What is Qi certification Qi certification process
Performance comparison of unaryexpr's function on matrix elements in eigen Library
And are two numbers of S
STM32 based d18s20 (one wire)
Bezier curve learning
Teach you a few tricks: 30 "overbearing" warm words to coax girls, don't look regret!
Introduction of laser drive circuit
Compiling owncloud client on win10
Mapping '/var/mobile/Library/Caches/com. apple. keyboards/images/tmp. gcyBAl37' failed: 'Invalid argume
XXL job configuration alarm email notification
Corn image segmentation count_ nanyangjx
HEVC学习之码流分析
QT_ AI
FFmpeg音视频播放器实现
opencv学习笔记三