• Remix
  • Share
  • New Entry

on 13 Oct 2021
  • 7
  • 25
  • 1
  • 0
  • 272
% See Cleve's post here for more info:
% https://blogs.mathworks.com/cleve/2020/04/15/champagne-portraits-of-complex-functions/
F=@(z) sin(z);
axis equal off
m=256;
cm1=parula(m);
cm=[cm1;flipud(cm1)];
n=25;
[x,y]=meshgrid(-1:2/(n-1):1);
c=exp((0:32)/16*pi*1i)/n;
w=F(x+y*1i);
r=abs(w);
th=angle(w)+pi;
sc=20;
for k=1:n
for j=1:n
t=m*th(k,j)/pi/sc;
ix=ceil(sc*t+realmin);
q=cm(ix,:);
p=w(k,j)+r(k,j)*c;
patch(real(p),imag(p),q)
end
end
Image
Remix Tree