function transform_points ( A, p )

%% transform_points.m

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

clf
hold on
for j = 1 : n
  quiver ( p(1,j), p(2,j), q(1,j) - p(1,j), q(2,j) - p(2,j), 'g', 'Linewidth', 3 );
  plot ( p(1,j), p(2,j), 'b.', 'Markersize', 50 );
  plot ( q(1,j), q(2,j), 'r.', 'Markersize', 50 );
end
%plot ( [ -10, +10 ], [ 0, 0 ], 'k:', 'Linewidth', 2 );
%plot ( [  0,  0 ], [ -10, +10 ], 'k:', 'Linewidth', 2 );
grid on
title ( 'Transform points', 'Fontsize', 24 );
%axis ( [ -10, +10, -10, +10 ] );
axis equal
%axis square
hold off
print ( '-djpeg', 'transform_points.jpg' );
