% ze zadane struktury 'points' vykresli schema mikrostruktury
clear Fig;

figure;

Fig=[points{4}(:,1:4) points{4}(:,1)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva4);
Fig=[points{4}(:,5:6) points{4}(:,10:-1:9) points{4}(:,5)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva4);
Fig=[points{4}(:,7:10) points{4}(:,7)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva4);
Fig=[points{4}(:,1) points{4}(:,5)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva4);
Fig=[points{4}(:,2) points{4}(:,6)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva4);
Fig=[points{4}(:,3) points{4}(:,7)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva4);
Fig=[points{4}(:,4) points{4}(:,8)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva4);

Fig=[points{2}(:,5:6) points{2}(:,4:-1:3) points{2}(:,5)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva2);
Fig=[points{2}(:,1:2) points{2}(:,4:-1:3) points{2}(:,1)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva2);
Fig=[points{2}(:,1) points{2}(:,5)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva2);
Fig=[points{2}(:,2) points{4}(:,6)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva2);

Fig=[points{3}(:,5:6) points{3}(:,4:-1:3) points{3}(:,5)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva3);
Fig=[points{3}(:,1:2) points{3}(:,4:-1:3) points{3}(:,1)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva3);
Fig=[points{3}(:,1) points{3}(:,5)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva3);
Fig=[points{3}(:,2) points{3}(:,6)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva3);

Fig=[points{1}(:,1:4) points{1}(:,1)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva1);
Fig=[points{1}(:,5:6) points{1}(:,10:-1:9) points{1}(:,5)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva1);
Fig=[points{1}(:,7:10) points{1}(:,7)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva1);
Fig=[points{1}(:,1) points{1}(:,5)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva1);
Fig=[points{1}(:,2) points{1}(:,6)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva1);
Fig=[points{1}(:,3) points{1}(:,7)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva1);
Fig=[points{1}(:,4) points{1}(:,8)];
line(Fig(1,:), Fig(2,:), Fig(3,:), 'Color', barva1);

view([120 30]);
axis equal;
axis vis3d;

clear Fig;
