image thumbnail
from 4RRR Parallel Manipulator by Hrishi Shah
This file is obsolete. newer version available in description.

[x]=myfunc(bx, by, phi, th)
function [x]=myfunc(bx, by, phi, th)
global l;
% bx=2;
% by=4;
% phi=35*3.1416/180;
% th=45*3.1416/180;
d2r=3.1416/180;
phi=phi*d2r;
th=th*d2r;
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];
% myplot(x(:,1),x(:,2));
return

Contact us at files@mathworks.com