function genshiftphase(width, height, period)
% width - sirka vzoru [px]
% 

% prepocet pixelu
x_col = 1:width;
x_col = (x_col*period*2*pi)/width;

% nastaveni pozadi
I_0 = 0.5;
% nastaveni amplitudy
I_mod = 0.5;

% fazovy pusun
phase_shift = (2/3)*pi;

% vypocet sinusovych vln (fazove posunutych)
I1 = I_0+I_mod.*cos(x_col - phase_shift);
I2 = I_0+I_mod.*cos(x_col);
I3 = I_0+I_mod.*cos(x_col+phase_shift);

% vytvoreni vzoru pro kodovani sloupce
Im1 = meshgrid(I1,1:height);
Im2 = meshgrid(I2,1:height);
Im3 = meshgrid(I3,1:height);

% vytvoreni vzoru pro kodovani radku
[~, Im4] = meshgrid(1:width,I1(1:height));
[~, Im5] = meshgrid(1:width,I2(1:height));
[~, Im6] = meshgrid(1:width,I3(1:height));


%% Ulozeni vzoru

imwrite(Im1,'ShiftPhaseColumn1.png');
imwrite(Im2,'ShiftPhaseColumn2.png');
imwrite(Im3,'ShiftPhaseColumn3.png');

imwrite(Im4,'ShiftPhaseRow1.png');
imwrite(Im5,'ShiftPhaseRow2.png');
imwrite(Im6,'ShiftPhaseRow3.png');

