2007年6月2日 星期六

第五次作業

1.1

程式碼
L1=10 L2=15 L3=5 d1=2 d2=2 d3=4
arm1=[0 0;-d1/2 0;-d1/2 L1;d1/2 L1;d1/2 0;0 0]
arm2=[0 0;0 d2/2;L2 d2/2;L2 -d2/2;0 -d2/2;0 0]
palm=[L2-d3/4 0;L2-d3/4 d3/2;L2-d3/4+d3 d3/2;L2-d3/4+d3 -d3/2;L2-d3/4 -d3/2;L2-d3/4 0]
line(arm1(:,1),arm1(:,2),'Color','r')
line(arm2(:,1),arm2(:,2),'Color','m')
line(palm(:,1),palm(:,2),'Color','b')
axis([-5 25 -4 15] )
圖示

1.2
function body(L1,L2,L3,theta1,theta2,theta3)
axis([-5 30 -25 20]);
Z = [cosd(-theta1) -sind(-theta1);sind(-theta1) cosd(-theta1)];
z = Z*[L1;0];
Y = [cosd(theta1+theta2) -sind(theta1+theta2);sind(theta1+theta2) cosd(theta1+theta2)];
y = z + Y*[L2;0];
X = [cosd(theta1+theta2+theta3) -sind(theta1+theta2+theta3);sind(theta1+theta2+theta3) cosd(theta1+theta2-theta3)];
x = y + X*[L3;0]; arm(x',y') arm(y',z') arm(z',[0 0])
axis equal ;
end

function arm(A,B)
d=4;
AB=(B(1)+j*B(2))-(A(1)+j*A(2));
D=abs(AB);th=angle(AB);xx=[0,D,D,0,0];
yy=[d/2,d/2,-d/2,-d/2,d/2];x=xx*cos(th)-yy*sin(th)+A(1);y=xx*sin(th)+yy*cos(th)+A(2);
line(x,y);
axis equal

1.3
圖示

1.4
動畫檔

2.1
手指有兩個指結 再加上手指和手掌連結處 我們必須考慮三個部分手指手掌關節處為球對 自由度為三兩個指結為旋轉對 大約可從0度轉到90度 且皆在同一平面上

2.2
手指完全伸直時圖示
手指彎曲到極限時 圖示

2.3
假設投球者球速為每秒100公里且球離開手瞬間球速和手指速度相等共耗時0.5秒則各手指速度和加速度如下 速度 角速度 角加速度
食指 100 km/s 2000000 rad/s 4000000 rad/s
中指 100 km/s 1250000 rad/s 2500000 rad/s
無名指 100 km/s 1428571 rad/s 2857142 rad/s
小拇指 100 km/s 3333333 rad/s 6666666 rad/s

沒有留言: