function transform_lines ( A, p1, p2 )

%% transform_vectors.m

q1 = A * p1;
q2 = A * p2;
[m,n] = size ( p1 );

clf
hold on
plot ( [ p1(1), p2(1) ], [ p1(2), p2(2) ], 'b-', 'Linewidth', 3 );
plot ( [ q1(1), q2(1) ], [ q1(2), q2(2) ], 'r-', 'Linewidth', 3 );
for j = 0 : 5
  p = ( j * p1 + (5-j) * p2 ) / 5;
  plot ( p(1), p(2), 'b.', 'Markersize', 25 );
  q = ( j * q1 + (5-j) * q2 ) / 5;
  plot ( q(1), q(2), 'r.', 'Markersize', 25 );
end
%plot ( [ -10, +10 ], [ 0, 0 ], 'k:', 'Linewidth', 2 );
%plot ( [  0,  0 ], [ -10, +10 ], 'k:', 'Linewidth', 2 );
grid on
title ( 'Transform a line', 'Fontsize', 24 );
%axis ( [ -10, +10, -10, +10 ] );
axis equal
%axis square
hold off
print ( '-djpeg', 'transform_lines.jpg' );
