2007年3月27日 星期二

hw 4




<4-1>

>> L=53;

>> axis equal;

>> Axis([-80 110 -80 110])

>> y=[0 (L/2)*(3)^(1/2) 0 0];

>> x=[0 L/2 L 0];

>> picture=line(x,y)

>> for n=1:120

rotate(picture,[0 0 1],3,[0 0 0])

pause(0.03)

end

for n=1:120

rotate(picture,[0 0 1],3,[L 0 0])

pause(0.03)

end

for n=1:120

rotate(picture,[0 0 1],3,[ L/2 (L/2)*(3)^(1/2) 0])

pause(0.03)

end

-----------------------------------------------------

<4-2>
linkshape([10 0],[0,0],4)

axis equal;

Axis([-20 20 -20 20])

X=15;Y=0;x=10;y=0;

for n=1:30:360;

Xx=x*cosd(n);

Yy=-x*sind(n);

linkshape([0,0], [Xx,Yy], 4)line([X,Xx],[Y,Yy]);

end

----------------------------------------

<4-3>

axis equal;

Axis([-8 18 -8 18])

x1=0;y1=0;

x2=3;y2=4;

x3=13;y3=4;

x4=10;y4=0;

linkshape([x1,y1],[x2 y2],2);

linkshape([x2,y2],[x3 y3],3);

linkshape([x3,y3],[x4 y4],1.5);

linkshape([x1 y1],[x4 y4],2);
for n=0:30:360;

a=x2*cosd(n)+y2*sind(n);

b=-x2*sind(n)+y2*cosd(n);

c=x3+(a-x2);

d=b;

linkshape([a b],[x1,y1],2);

linkshape([c d],[a,b],3);

linkshape([x4 y4],[c,d],1.5);

linkshape([x1 y1],[x4,y4],2);

end;

2 則留言:

不留白老人 提到...

為什麼僅有一題?

shfantm 提到...

教授你好:
最當初交作業時就三題都有寫阿
老師是不是不小心看錯了?
麻煩您再看看,謝謝!