function linmapvis(A)
% Visualizes the action of the linear mapping described by matrix A by applyung
% it to a star. 

% Create a $2\times 13$-matrix \texttt{x} whose columns contain the coordinates of the
% vertices of the star
x_outer = [cos(2*pi*(0:6)/6);sin(2*pi*(0:6)/6)];
x_inner = 0.5*[cos(2*pi*(0:5)/6+pi/6);sin(2*pi*(0:5)/6+pi/6)];
x = zeros(2,13); x(:,1:2:13) = x_outer; x(:,2:2:12) = x_inner; 

% Map the star
y = A*x;

% Plot the original star and its image under $\VA$
figure('name','image of star');
plot(x(1,:),x(2,:),'b-+',y(1,:),y(2,:),'r-*',[0],[0],'kp'); hold on;
legend('origjnal','mapped','location','best'); grid on;
axis equal; title(['Image of star under ' mat2str(A)]);


