function [ Z ] = imgFunc2D( numXpixels,numYpixels,theta )
% Creates a kind of resolution target.


% x = linspace(-(numXpixels/16)*pi,(numXpixels/16)*pi,numXpixels);
% y = linspace(0,pi,numYpixels);

% divN = 256;

% divN = 1024;
divN = 1/136;

if mod(numXpixels,2)==0
    x = linspace(-(pi/divN),pi/divN,numXpixels+1);
    x = x(1:end-1);
else
    x = linspace(-(pi/divN),pi/divN,numXpixels);
end

if mod(numYpixels,2)==0
    y = linspace(-(pi/divN),pi/divN,numYpixels+1);
    y = y(1:end-1);
else
    y = linspace(-(pi/divN),pi/divN,numYpixels);
end

[X,Y] = meshgrid(x,y);

%rotate coordinate system by theta
X1 = cos(theta).*X - sin(theta).*Y;
Y1 = sin(theta).*X + cos(theta).*Y;


Z = (cos((X1).*(Y1 - pi/divN).*(divN/2)) + 1)./2;
% Z = (cos(X1/divN) + 1)./2;
% Z = (sin(X1/16) + 1)./2;
% Z = (cos(X1)+1);
% Z = sin((X1));
% Z = zeros(numYpixels,numXpixels);

end

