Buddahbrot in Color

Tucker Downs on 15 Oct 2021
  • 22
  • 114
  • 0
  • 280
s=500;
q=zeros(s,s,3);
z=ones(1,99);
f=@(x)round(x*83);
for j=1:1e6
a=rand*4-2;
b=rand*4-2;
c=a+b*i;
e=hsv2rgb(atan2(b,a)./7+.5,1,1);
z(1)=c;
for j=2:99
z(j)=z(j-1)^2+c;
end
if abs(z(end))>3
for p = z;
x=f(imag(p)+3);
y=f(real(p)+3);
if x<1|y<1|x>s|y>s
continue
end
q(y,x,:)=q(y,x,:)+e;
end
end
end
imshow((q./50).^.5);

Remix tree