• Remix
  • Share
  • New Entry

on 5 Oct 2021
  • 4
  • 20
  • 0
  • 0
  • 274
m = @(x) [(x(1)+x(3))/2,(x(2)+x(4))/2];
f = @(t) [t(1:2),m(t(1:4)),m([t(1:2),t(5:6)]);m(t(1:4)),t(3:4),m(t(3:6));m([t(1:2),t(5:6)]),m(t(3:6)),t(5:6)];
d = @(t) patch(t(1:2:6),t(2:2:6),[rand(1),rand(1),rand(1)]);
t = [0,0,1,0,0.5,sqrt(3)/2];
for n=1:2000
d(t(n,:));
t = [t;f(t(n,:))];
end
Image
Remix Tree