function transform_polygon_plot ( A, p )

%% transform_polygon_plot.m

q = A * p;
[m,n] = size ( p );

clf
hold on
plot ( [p(1,:), p(1,1)], [p(2,:),p(2,1)], 'b-', 'Linewidth', 3);
plot ( [q(1,:), q(1,1)], [q(2,:),q(2,1)], 'r-', 'linewidth', 3 );
%plot ( [ -10, +10 ], [ 0, 0 ], 'k:', 'Linewidth', 2 );
%plot ( [  0,  0 ], [ -10, +10 ], 'k:', 'Linewidth', 2 );
grid on
title ( 'Transform polygon plot', 'Fontsize', 24 );
%axis ( [ -10, +10, -10, +10 ] );
axis equal
%axis square
hold off
print ( '-djpeg', 'transform_polygon_plot.jpg' );
