• Remix
  • Share
  • New Entry

on 6 Oct 2022
  • 1
  • 10
  • 0
  • 0
  • 275
N=4e3;
v=zeros(N,2);
a=5;rng(200);
c=[[0,0];[1,1];[1,0];[0,1]; [.5,.5]];
plot(c(:,1),c(:,2),'.',markersize=20);
p=[0,0];
lc=1;
for i=1:N
idx = randi(a);
while idx==(mod(lc+1,a)+1)
idx = randi(a);
end
lc=idx;
s=c(idx,:);
p=(p+s)/2;
v(i,:)=p;
end
plot(v(:,1),v(:,2),'hexagram','Color',[0.7 0.4 0.9])
axis off
Remix Tree