clear all;
close all;
P1 = [1,-0.8,0]; 
P2 = [0.5,-0.8,-0.866]; 
P3 = [-0.5,-0.8,-0.866]; 
P4 = [-1,-0.8,0]; 
P5 = [-0.5,-0.8,0.866]; 
P6 = [0.5,-0.8,0.866]; 
P7 = [0.84,-0.4,0]; 
P8 = [0.315,0.125,-0.546]; 
P9 = [-0.21,0.65,-0.364]; 
P10 = [-0.36,0.8,0]; 
P11 = [-0.210,0.65,0.364]; 
P12 = [0.315,0.125,0.546];
P = [ P1',P2',P3',P4',P5',P6',P7',P8',P9',P10',P11',P12'];

C = [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6; ...
      2, 3, 4, 5, 6, 1, 8, 9, 10, 11, 12, 7, 7, 8, 9, 10, 11, 12];

Draw(P,C);
pause;
disp('Redrawing the image after scalings');
P1 = Scale(P,1.8,0.5,3);
Draw(P1,C);
pause;
disp('Redrawing the image after translations');
P2 = Translate(P,1.2,0.4,1.7);
Draw(P2,C);
pause;
disp('Redrawing the image after rotations about x-axis');
P3 = Rotate(P,pi/2,1);
Draw(P3,C);
pause;
disp('Redrawing the image after rotations about y-axis');
P4 = Rotate(P,pi/2,2);
Draw(P4,C);
pause;
disp('Redrawing the image after rotations about z-axis');
P5 = Rotate(P,pi/2,3);
Draw(P5,C);
pause;
disp('Redrawing the image after composite rotation');
PP = Rotate(Rotate(Rotate(P,pi/6,1),-7*pi/18,2),-27*pi/180,3);
Draw(PP,C);
