• Remix
  • Share
  • New Entry

on 4 Oct 2021
  • 2
  • 68
  • 5
  • 0
  • 225
N=10^5;
v=zeros(N,2);
a=5;
t=linspace(0,2*pi,a+1);
c=[cos(t);sin(t)]';
p=[0,0];
lc=1;
for i=1:N
idx=randi(a);
while idx==lc % don't use the same vertex as last time
idx=randi(a);
end
lc=idx;
s=c(idx,:);
p=(p+s)/2;
v(i,:)=p;
end
plot(v(:,1),v(:,2),'.',markersize=1)
xlim([-1,1])
ylim([-1,1])
axis off
Remix Tree
Load full remix tree