- /
-
Gaston Julia's water lilies
on 4 Oct 2021
- 8
- 32
- 0
- 0
- 277
ls=@(x) linspace(-x,x,2000);
[X,Y]=meshgrid(ls(1),ls(1.2));
imagesc(X(1,:),Y(:,1),arrayfun(@(x) J(x,.285+.01*1i),X+1i*Y));
axis equal off;
c=rgb2hsv(jet);
c(:,2)=c(:,2).*min(1,abs(linspace(0,1,256)'-.5)/.1);
colormap(hsv2rgb(c));
function i=J(x,c)
i=0;
while abs(x)<2 && i<200
x=x^2+c;
i=i+1;
end
end