function Draw(P,C)
% function Draw(P,C)
% Draw a view of a three-dimensional object at the computer screen (
% P - coordinate matrix of vertices of the object, C - a matrix of line segments between the vertices

[m,n] = size(P); % m = 3 for all examples
[s,k] = size(C); % s = 2 for line segments
        
AxMax = max(P');
AxMin = min(P');
figure(1); clf;
axis([AxMin(1), AxMax(1), AxMin(2), AxMax(2)]);
hold on;
for j = 1:k
    plot([P(1,C(1,j)), P(1,C(2,j))],[P(2,C(1,j)), P(2,C(2,j))],'b')
end
% fill(P(1,:),P(2,:),'m');
title('A two-dimensional view of a three-dimensional object');
xlabel('x');
ylabel('y');
hold off;