• Remix
  • Share
  • New Entry

on 14 Oct 2021
  • 8
  • 26
  • 0
  • 0
  • 275
hold on
p=exp(i*pi/3).^(0:2:4);
for m=1:5
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),i*q)
arrayfun(@(x)l(x),exp(i*pi/6)*q)
axis off equal
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