clc;

xd=[];
yd=[];
zd=[];
W=[];
RA=[];
PM=[];
PF=[];
MT=[];
r=20;
s2=sqrt(2)/2;
ox=30;
oy=30;
oz=30;
MT=[s2 0 s2 ox;-0.5000 s2 0.5000 oy;-0.5000 -s2 0.5000 oz; 0 0 0 1]
T=10;
t=0.1;
L=360;

for n=0:t:T
%Para obtener posición y velocidad (angular) del efector final.
s = L*((n/T)-(1/(360))*sind(360*n/T));
%sp = L*((1/T)-(1/T)*cosd(360*n/T));
%Para obtener posición del efector final.
PM=[-r*sind(s);r*cosd(s);0;1];
PF=MT*PM;
xd=[xd PF(1,1)];
yd=[yd PF(2,1)];
zd=[zd PF(3,1)];

end
plot3(xd,yd,zd,'c.:')

Sign up to vote on this title
UsefulNot useful