Impact-Site-Verification: dbe48ff9-4514-40fe-8cc0-70131430799e

Search This Blog

MATLAB Program for Cat


%Code:

fill([-2 -2 2 2],[-2 2 2 -2],'k');
axis([-2 2 -2 2]);
axis square;
pause(1);
hold on;
fill([-0.8 -0.8 -0.6 -0.8],[0.6 0.95 0.8 0.6],'w');
pause(1);
fill([0.8 0.8 0.6 0.8],[0.6 0.95 0.8 0.6],'w');
pause(1);
t=0:0.01:2*pi;
x=cos(t);
y=sin(t);
plot(x,y,'w','linewidth',3);
axis square;
pause(1);
grid on;
hold on;
t=0:0.01:2*pi;
x=-0.6+0.1*cos(t);
y=0.4+0.1*sin(t);
fill(x,y,'w');
pause(1);
t=0:0.01:2*pi;
x=0.6+0.1*cos(t);
y=0.4+0.1*sin(t);
fill(x,y,'w');
pause(1);
t=pi/3:0.01:5*pi/6;
x=-0.6+0.14*cos(t);
y=0.4+0.14*sin(t);
plot(x,y,'w','linewidth',3);
pause(1);
t=pi/3:0.01:5*pi/6;
x=0.6+0.14*cos(t);
y=0.4+0.14*sin(t);
plot(x,y,'w','linewidth',3);
pause(1);
t=pi:0.01:2*pi;
x=-0.11+0.1*cos(t);
y=-0.3+0.1*sin(t);
plot(x,y,'w','linewidth',3);
pause(1);
t=pi:0.01:2*pi;
x=0.11+0.1*cos(t);
y=-0.3+0.1*sin(t);
plot(x,y,'w','linewidth',3);
pause(1);
plot([-0.3 -0.5],[-0.1 0.1],'w','linewidth',3);
pause(1);
plot([-0.3 -0.5],[-0.2 -0.4],'w','linewidth',3);
pause(1);
plot([-0.3 -0.6],[-0.15 -0.15],'w','linewidth',3);
pause(1);
plot([0.3 0.5],[-0.1 0.1],'w','linewidth',3);
pause(1);
plot([0.3 0.5],[-0.2 -0.4],'w','linewidth',3);
pause(1);
plot([0.3 0.6],[-0.15 -0.15],'w','linewidth',3);


No comments

Popular Posts

Followers