image thumbnail
from 4RRR Kinematics with GUI and Mouse Support by Hrishi Shah
Fully Generalized 4RRR Kinematics with GUI

[x]=myfunc(bx, by, phi, th)
function [x]=myfunc(bx, by, phi, th)
MainGui=getappdata(0, 'MainGui');
l=getappdata(MainGui,'l');
dx1=l*cos(th/2)*cos(phi);
dx2=l*sin(th/2)*sin(phi);
dy1=l*cos(th/2)*sin(phi);
dy2=l*sin(th/2)*cos(phi);
x(:,1)=[bx+dx1;bx-dx2;bx-dx1;bx+dx2;bx+dx1];
x(:,2)=[by+dy1;by+dy2;by-dy1;by-dy2;by+dy1];
return

Contact us at files@mathworks.com