vertices = [0 0 0; 1 0 0; 1 1 0; 0 1 1; 1 0 1]+2;
faces = [1 2 3 4 5];

hp = patch ('Vertices', vertices, 'Faces', faces, 'FaceColor', 'g');
view(3)

text(vertices(1,1), vertices(1,2), vertices(1,3), '1')
text(vertices(2,1), vertices(2,2), vertices(2,3), '2')
text(vertices(3,1), vertices(3,2), vertices(3,3), '3')
text(vertices(4,1), vertices(4,2), vertices(4,3), '4')
text(vertices(5,1), vertices(5,2), vertices(5,3), '5')

%%
vertices = [0 0 0; 0.5 -0.5 0; 1 0 0; 1 1 0; 0 1 1; 1 0 1; 0 -1 0;]+3;
faces = [1 2 3 4 5 6 7];

figure
hp = patch ('Vertices', vertices, 'Faces', faces, 'FaceColor', 'g');
xlabel('x'), ylabel('y'), zlabel('z')
view(3)
text(vertices(1,1), vertices(1,2), vertices(1,3), '1')
text(vertices(2,1), vertices(2,2), vertices(2,3), '2')
text(vertices(3,1), vertices(3,2), vertices(3,3), '3')
text(vertices(4,1), vertices(4,2), vertices(4,3), '4')
text(vertices(5,1), vertices(5,2), vertices(5,3), '5')
text(vertices(6,1), vertices(6,2), vertices(6,3), '6')
text(vertices(7,1), vertices(7,2), vertices(7,3), '7')

%%
vertices = [0 0 0; 0.5 -0.5 0; 1 0 0; 1 1 0; 0 1 1; 1 0 1; 0 -1 0;]+3;
faces = [1 2 3 4 5 6 7; 1 3 4 5 6 NaN NaN];

figure
hp = patch ('Vertices', vertices, 'Faces', faces, 'FaceColor', 'g');
xlabel('x'), ylabel('y'), zlabel('z')
view(3)
text(vertices(1,1), vertices(1,2), vertices(1,3), '1')
text(vertices(2,1), vertices(2,2), vertices(2,3), '2')
text(vertices(3,1), vertices(3,2), vertices(3,3), '3')
text(vertices(4,1), vertices(4,2), vertices(4,3), '4')
text(vertices(5,1), vertices(5,2), vertices(5,3), '5')
text(vertices(6,1), vertices(6,2), vertices(6,3), '6')
text(vertices(7,1), vertices(7,2), vertices(7,3), '7')

%%
vertices = [0 0 0; 1 0 0; 1 1 0; 0 1 0; -1 0 0]+2;
faces = [1 2 3 4 5];

figure
hp = patch ('Vertices', vertices, 'Faces', faces, 'FaceColor', 'g');

%%
vertices = [0 0; 1 0; 1 1; 0 1; -1 0]+2;
faces = [1 2 3 4 5];

figure
hp = patch ('Vertices', vertices, 'Faces', faces, 'FaceColor', 'g');
