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

Search This Blog

MATLAB Program for Alpona design


Code:

figure;
pause(5);
fill([-20 -20 20 20],[-20 20 20 -20],'k');
hold on;
t=0:0.01:4*pi;
x=cos(t);
plot(t,x,'w','linewidth',2);
hold on;
for i=1:50
q=[t;x];
e=pi/20*i;
z=[cos(e) -sin(e);sin(e) cos(e)];
k=z*q;
r=k(1,:);
d=k(2,:);
plot(r,d,'w','linewidth',2);
pause(0.1);
axis equal;
end
t=0:0.01:4*pi;
x=-cos(t);
plot(t,x,'w','linewidth',2);
hold on;
for i=1:50
q=[t;x];
e=-pi/20*i;
z=[cos(e) -sin(e);sin(e) cos(e)];
k=z*q;
r=k(1,:);
d=k(2,:);
plot(r,d,'w','linewidth',2);
pause(0.1);
hold on;
axis equal;
end
hold on;


No comments

Popular Posts

Followers