matlab使照片卡通化,怎么样用matlab设计动画直接画出奥运五环
滿意答案
we923dv
2018.12.19
采納率:50%????等級(jí):8
已幫助:763人
clear all;
clc;
figure
for i =1:50
r(i)=0.2*i;%設(shè)定圓心半徑為10,這個(gè)可以自己改;
theta=0:pi/25:2*pi;
x1=0;y1=0;%以藍(lán)色圓圓心為起始點(diǎn);
x2=25;y2=y1;%設(shè)置黑圓圓心;
x3=50;y3=y1;%設(shè)置紅圓圓心;
x4=(x1+x2)/2;y4=y1-10;%設(shè)置黃圓圓心;
x5=(x2+x3)/2;y5=y4;%設(shè)置藍(lán)圓圓心;
plot(x1+r(i)*cos(theta),y1+r(i)*sin(theta),'bo','Linewidth',2);hold on;%畫第一個(gè)圓
plot(x2+r(i)*cos(theta),y2+r(i)*sin(theta),'kd','Linewidth',2);%畫第二個(gè)圓
plot(x3+r(i)*cos(theta),y3+r(i)*sin(theta),'rp','Linewidth',2);%畫第三個(gè)圓
plot(x4+r(i)*cos(theta),y4+r(i)*sin(theta),'y>','Linewidth',2);%畫第四個(gè)圓
plot(x5+r(i)*cos(theta),y5+r(i)*sin(theta),'g
set(0,'defaultfigurecolor','w')%使背景變成白色
axis([-15 65 -25 15])%限定坐標(biāo)軸范圍
axis off%去掉坐標(biāo)軸
hold off
pause(0.1);
end
00分享舉報(bào)
總結(jié)
以上是生活随笔為你收集整理的matlab使照片卡通化,怎么样用matlab设计动画直接画出奥运五环的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Win10安装Ubuntu子系统教程(附
- 下一篇: 5G工业路由器