当前位置:网站首页>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 
边栏推荐
- Text to SQL model ----irnet
- 鲸会务一站式智能会议系统帮助主办方实现数字化会议管理
- 批量执行SQL文件
- Addition of attention function in yolov5
- VS2005 compiles libcurl to normaliz Solution of Lib missing
- STM32 based d18s20 (one wire)
- Teach you a few tricks: 30 "overbearing" warm words to coax girls, don't look regret!
- Cause analysis of serial communication overshoot and method of termination
- Leetcode22 summary of types of questions brushing in 2002 (XII) and collection search
- The principle and function of focus
猜你喜欢

Design based on STM32 works: multi-functional atmosphere lamp, wireless control ws2812 of mobile app, MCU wireless upgrade program

Discrete device ~ diode triode

Design of reverse five times voltage amplifier circuit

Installation of jupyter

Corn image segmentation count_ nanyangjx

Trimming_ nanyangjx

Digital image processing learning (II): Gaussian low pass filter

Fabrication of modulation and demodulation circuit

51 single chip microcomputer project design: schematic diagram of timed pet feeding system (LCD 1602, timed alarm clock, key timing) Protues, KEIL, DXP

Recovering the system with Clonezilla USB disk
随机推荐
Checkerboard generation + camera calibration + stereo matching
FFmpeg音视频播放器实现
SQL learning experience (II): question brushing record
keras_ Callback function summary
(3) Dynamic digital tube
Opencv learning notes II
XXL job configuration alarm email notification
And are two numbers of S
HEVC学习之码流分析
Leetcode notes: binary search simple advanced
Embedded Software Engineer (6-15k) written examination interview experience sharing (fresh graduates)
OpenGL display mat image
optee中支持的时间函数
软件工程-个人作业-提问回顾与个人总结
torch. fft
Nebula diagram_ Object detection and measurement_ nanyangjx
RF filter
Discrete device ~ resistance capacitance
opencv學習筆記三
Line detection_ nanyangjx