• Remix
  • Share
  • New Entry

on 4 Oct 2021
  • 2
  • 21
  • 0
  • 0
  • 180
N=10^4;
v=zeros(N,2);
t=linspace(0,2*pi,7);
c=[sin(t);cos(t)]';
p=[0,0];
lc=1;
for i=1:N
idx=randi(6);
lc=idx;
s=c(idx,:);
p=(p+s)/3;
v(i,:)=p;
end
plot(v(:,1),v(:,2),'r.')
xlim([-1,1])
ylim([-1,1])
axis off
Remix Tree