% a wall of tiles, specified in terms of dilation=a, translation=b, chirp=c % % returns a gridwork % % USE: contour(tilesabc(4,4,100,100,0,0,0)) % tiles(u,v, M , N , dilation_and_zoom, translation, chirp_rate) % tiles(u,v, M , N ,a,b,c); % % translation=1/N moves image one pixel to right % translation=i*1/M moves image one pixel DOWN (FIX THIS???) % dilation_and_zoom = exp(i*30*o) causes 30deg rot CLOCKWISE (FIX THIS???) % dilation_and_zoom = 2 makes everything smaller; (more cycles appear) % % X to right, Y up; that makes ROTATION (origin) ABOUT LOWER LEFT CORNER % for M down, N to right, use rot90(___,3), for example: % imagesc(rot90(tilesabc(3,3,100,100,exp(i*10*o),0),3)); axis square % % chirp_rate not yet implemented (take it from tiles.m: angle,f1,f2, and all...) %function E = dummy(u,v,M,N,angle,f1,f2,X0,Y0); %function E = dummy(u,v,M,N,dilation_and_zoom,translation,chirp_parameters); function E = dummy(u,v,M,N,a,b,c); if nargin >= 7 disp('chirp parameters not yet implemented; modify tilesabc.m or use tiles.m') end%if if nargin<=6 c = 0; % identity chirp-rates end%if if nargin<=5 b = 0; % identity translation end%if if nargin<=4 a = 1 + 0*i; % identity zoom end%if if nargin < 4 disp('need at least 4 input arguments (e.g. the frequencies and size)') end%if %x = cos(2*pi*u*((0:(N-1))/N)); %y = cos(2*pi*v*((0:(M-1))/M)); %[X, Y] = meshdom(u*((0:(N-1))/N),v*((0:(M-1))/M)); [X, Y] = meshdom((0:(N-1))/N,(0:(M-1))/M); Z = X + i*Y; Z2 = a*Z + b; X2 = real(Z2); Y2 = imag(Z2); E = cos(2*pi*u*X2).*cos(2*pi*v*Y2); % chessboard-like pattern %E = abs(cos(2*pi*u*X2)).*abs(cos(2*pi*v*Y2)); % tile-like pattern