這個函數實際上與drawlimit相同,只是它是將四個連桿先存在握把中,然後再設法將其中之座標改變,以達到圖形變動之效果。
Read more!
function h=f4limits(r,th1,sigma,driver)
%function f4lmits(r,th1,sigma,driver)
%draw the positions of four-bar links
%call f4bar funcion
%r: row vector for four links
%th1: frame angle
%sigma: assembly mode
%driver: 0 for crank, 1 for coupler
% Example:h=f4limits([4 2 3 4],0,1,0)
[Qstart, Qstop]=fb_angle_limits(r,th1,driver)
[values b]=f4bar(r,th1,Qstart,0,0,sigma,driver);
if b==1,
h=draw4link(values,driver);
else
fprintf('Combination of links fails at degrees %6.1f\n',Qstart);
end
[values b]=f4bar(r,th1,Qstop,0,0,sigma,driver);
if b==1,
h=draw4link(values,driver);
else
fprintf('Combination of links fails at degrees %6.1f\n',Qstart);
end
axis equal
grid on