• Remix
  • Share
  • New Entry

on 14 Oct 2021
  • 2
  • 16
  • 2
  • 0
  • 229
hold on
p=i*exp(i*pi/3).^(0:2:4);
% c=p;
for m=1:6
for n=1:3^m/3
b=3*n-2;
q(b:b+2,:)=(p(n,:)+p(n,:).')/2;
end
p=q;
end
arrayfun(@(x)l(x),q)
function l(q)
t=angle(q)/pi/2;
if t<0
t=1+t;
end
plot(real(q),imag(q),'h','MarkerEdgeColor',hsv2rgb([t,abs(q),1]))
end
Remix Tree