% one_on_f_noise2_test.m, (c) M Roughan, 2018
%
% created: 	Thu Mar 22 2018 
% author:  	M Roughan 
% email:   	matthew.roughan@adelaide.edu.au
% 

clear;
N = 100;

figure(1)
surf( one_on_f_noise2(N, 1.5, 1) )
view([-115, 72])

set(gcf, 'PaperUnits', 'centimeters')
set(gcf, 'PaperPosition', [0 0 20 12])
set(gcf, 'PaperSize', [20 12])
filename = sprintf('Plots/one_on_f_noise2_test.pdf');
print(filename, '-dpdf')



N = 300;
x = (0:N-1)/N;
[X,Y] = meshgrid(x);
f_x = 3;
f_y = 4;
A = sin(2*pi*(f_x*X + f_y*Y));

figure(2)
imagesc(A);
colormap(gray);

sigma = 1.0;
z = one_on_f_noise2(N, 2.0, 2);
z = sigma * z / max(max(z));
B = sin(2*pi*(f_x*X + f_y*Y + z));

figure(3)
imagesc(B);
colormap(gray);
axis image
figure(3)
set(gcf, 'PaperUnits', 'centimeters')
set(gcf, 'PaperPosition', [0 0 12 12])
set(gcf, 'PaperSize', [12 12])
filename = sprintf('Plots/one_on_f_noise2_test.png');
print(filename, '-dpng');

