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