Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

clc;

clear all;
hold on;
grid on;
axis equal;

%% Defina el valor de las dimensiones del mecanismo


R1= 2;
R2= 1.5;
R3= 2.5;
R4= 2.25;
R5= 5;
R6= 4;
R7= 4.5;
R8= 4;
R9= 2.5;

tol =0.01;
s = 0.0567;
theta1=0;
theta8=0;
x0= [0.261799, 1.423, 0.345, 0.7686];
for theta2 = 0:0.1:2*pi
cla
F =@fun1;
x0= [0.261799, 1.5708, 0.5657, 1.0472];
x = fsolve(F,x0);
d=theta2;

z = [0,R2*cos(d),R2*cos(d)+R3*cos(x(1)),R2*cos(d)+R3*cos(x(1))-
R4*cos(x(2)),R1*cos(theta1),R1*cos(theta1)+R8*cos(x(2)-
s),R1*cos(theta1)+R8*cos(x(2)-s)+R5*cos(x(3)),R1*cos(theta1)+R8*cos(x(2)-
s)+R5*cos(x(3))-R6*cos(x(4))]

y = [0,R2*sin(d),R2*sin(d)+R3*sin(x(1)),R2*sin(d)+R3*sin(x(1))-
R4*sin(x(2)),0,R1*sin(theta1)+R8*sin(x(2)-s),R1*sin(theta1)+R8*sin(x(2)-
s)+R5*sin(x(3)),R1*sin(theta1)+R8*sin(x(2)-s)+R5*sin(x(3))-R6*sin(x(4))];

plot(z,y);
pause (0.1);
axis([-10 10 -10 10]);

end

You might also like