:
, A , . , , . "" , , . . . .
% Define A
A = [-2,-2,6,6,-2; -2,2,2,-2,-2; 1 1 1 1 1];
% Define Translation Matrix
trans = @(x,y,z) repmat([x; y; z],[1 5]);
% Define Rotation Matrix
se2 = @(x, y, theta) [
cosd(theta), -sind(theta), x;
sind(theta), cosd(theta), y;
0, 0, 1];
% Calculate Rotated Rect
B = se2(0,0,45) * (A - trans(2,0,0) ) + trans(2,0,0);
% Plot Rectangles
figure; plot(A(1,:),A(2,:),'b')
hold on;
plot(B(1,:),B(2,:),'r')
hold off;
axis equal
trans .
:
>> A
A =
-2 -2 6 6 -2
-2 2 2 -2 -2
1 1 1 1 1
>> B
B =
0.5858 -2.2426 3.4142 6.2426 0.5858
-4.2426 -1.4142 4.2426 1.4142 -4.2426
1.0000 1.0000 1.0000 1.0000 1.0000
A/B, .

A/B .

:
, , -30 B.