Documente Academic
Documente Profesional
Documente Cultură
end
for j = 1:1:n
if(z(k) == Z(j))
for raj = 1:1:npoints
tetc = ang1*(raj-1);
tetd = ((tet - tetc)^2)^0.5;
if (tetd > pi)
tetd = 2*pi - tetd;
end
tup = tetc + ang2;
twl = tetc;
tup2 = tetc;
twl2 = tetc - ang2;
if(0 < tetc) && (tetc < ang2)
tup2 = 2*pi;
twl2 = 2*pi+tetc-ang2;
twl = 0;
elseif(2*pi-ang2 < tetc) && (tetc < 2*pi)
tup2 = 2*pi;
twl2 = tetc - ang2;
tup = tup - 2*pi;
twl = 0;
end
for j = 1:1:n
index = -1;
for raj = 1:1:npoints
index = index + 2;
X(j,index) = rajesh(j,raj) * cos(teta1(j,raj));
for k = 1:1:i
radius = ((x(k)^2)+(y(k)^2))^(1/2);
tet = atan2(y(k),x(k));
if tet < 0
tet = 2*pi + tet;
end
for j = 1:1:n
if(z(k) == Z(j))
for raj = 1:1:npoints
tetc = ang1*(raj-1);
tetd = ((tet - tetc)^2)^0.5;
if (tetd > pi)
tetd = 2*pi - tetd;
end
tup = tetc + ang2;
twl = tetc;
tup2 = tetc;
twl2 = tetc - ang2;
if(0 < tetc) && (tetc < ang2)
tup2 = 2*pi;
twl2 = 2*pi+tetc-ang2;
twl = 0;
elseif(2*pi-ang2 < tetc) && (tetc < 2*pi)
tup2 = 2*pi;
twl2 = tetc - ang2;
tup = tup - 2*pi;
twl = 0;
end
for j = 1:1:n
index = -1;
for raj = 1:1:npoints
index = index + 2;
X(j,index) = rajesh(j,raj) *
Y(j,index) = rajesh(j,raj) *
ZZ(j,index) = Z(j);
X(j,index+1) = rajesh(j,raj)
Y(j,index+1) = rajesh(j,raj)
ZZ(j,index+1) = Z(j);
end
end
X(:,index+2) = X(:,1);
Y(:,index+2) = Y(:,1);
ZZ(:,index+2) = ZZ(:,1);
cos(teta1(j,raj));
sin(teta1(j,raj));
* cos(teta2(j,raj));
* sin(teta2(j,raj));
Assignment 3
Workspace of SCARA Robot
Submitted by
J. Rajesh,
Sajan Kapil
Roll No.:114103100
Roll No.:11410394