|
width=30;
length=4;
xc=20;yc=30;
RotationgAngle=60; % in degree
% Computing the Relative Position After Rotation
RotationgAngle=RotationgAngle/180*pi;
RotateMatrix=[cos(RotationgAngle),sin(RotationgAngle);-sin(RotationgAngle),cos(RotationgAngle)];
PostRT=RotateMatrix*[width/2,length/2]';
PostRB=RotateMatrix*[width/2,-length/2]';
PostXY=[PostRT,PostRB,-PostRT,-PostRB,PostRT]+repmat([xc,yc]',[1,5]);
plot(PostXY(1,:),PostXY(2,:))
axis image |
评分
-
1
查看全部评分
-
|