|
a=[1,2];
>> b=3;
>> x=a(1);
>> y=a(2);
>> up=[x-b/2 y+b/2];
>> top_L=[x-b/2 y+b/2];
>> top_R=[x+b/2 y+b/2];
>> bottom_L=[x-b/2 y-b/2];
>> bottom_R=[x+b/2 y-b/2];
>> line([top_L(1),top_R(1)],[top_L(2),top_R(2)]);
>> hold on;
>> line([top_L(1),bottom_L(1)],[top_L(2),bottom_L(2)]);
>> line([top_R(1),bottom_R(1)],[top_R(2),bottom_R(2)]);
>> line([bottom_L(1),bottom_R(1)],[bottom_L(2),bottom_R(2)]); |
评分
-
1
查看全部评分
-
|