• Remix
  • Share
  • New Entry

  • Victoria

  • /
  • Sun Reflection in the Water

on 10 Oct 2021
  • 53
  • 35
  • 2
  • 0
  • 274
% The Fourier spectrum of a circle
% By Victoria A. Sablina
N=128;
a=N/2;
f=zeros(N);
F=f;
for x=1:N
for y=1:N
if (x-a)^2+(y-a)^2<a
f(x,y)=255;
end
end
end
[x,y]=meshgrid(1:N,1:N);
g=(f.*(-1).^(x+y));
for u=1:N
for v=1:N
F(u,v)=sum(sum(g.*exp(-2i*pi*(u*x/N+v*y/N))));
end
end
S=abs(F);
image(S/max(S(:))*255);
axis off;
title('MATLAB Central 20^{th} anniversary!!!');
Image
Remix Tree